Fix readCompactLength()

This commit is contained in:
László Monda
2017-06-15 13:03:02 +02:00
parent 975c4709b4
commit 0843ecd89e

View File

@@ -110,7 +110,7 @@ export class UhkBuffer {
readCompactLength(): number { readCompactLength(): number {
let length = this.readUInt8(); let length = this.readUInt8();
if (length === UhkBuffer.longCompactLengthPrefix) { if (length === UhkBuffer.longCompactLengthPrefix) {
length += this.readUInt8() << 8; length = this.readUInt16();
} }
return length; return length;
} }