fix issue with reading strings. looks for start,end instead of start,length
This commit is contained in:
@@ -122,7 +122,7 @@ class UhkBuffer {
|
|||||||
|
|
||||||
readString(): string {
|
readString(): string {
|
||||||
let stringByteLength = this.readCompactLength();
|
let stringByteLength = this.readCompactLength();
|
||||||
let str = this.buffer.toString(UhkBuffer.stringEncoding, this.offset, stringByteLength);
|
let str = this.buffer.toString(UhkBuffer.stringEncoding, this.offset, this.offset+stringByteLength);
|
||||||
this.dump(`${UhkBuffer.stringEncoding}(${str})`);
|
this.dump(`${UhkBuffer.stringEncoding}(${str})`);
|
||||||
this.bytesToBacktrack = stringByteLength;
|
this.bytesToBacktrack = stringByteLength;
|
||||||
this.offset += stringByteLength;
|
this.offset += stringByteLength;
|
||||||
|
|||||||
Reference in New Issue
Block a user