fix: _newBuf needs to reset offset to 0

This commit is contained in:
Derrick Hammer 2023-08-31 02:23:49 -04:00
parent b1f4ab93d8
commit 31e63f6c63
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ export default class Packer {
private _newBuf(size: number) { private _newBuf(size: number) {
this._buf = Buffer.alloc(size); this._buf = Buffer.alloc(size);
this._d = new DataView(this._buf.buffer, this._buf.byteOffset); this._d = new DataView(this._buf.buffer, this._buf.byteOffset);
this._offset = 0;
} }
private _nextBuf() { private _nextBuf() {