Fix readCompactLength()
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user