fix: _newBuf needs to reset offset to 0
This commit is contained in:
parent
b1f4ab93d8
commit
31e63f6c63
|
@ -18,6 +18,7 @@ export default class Packer {
|
|||
private _newBuf(size: number) {
|
||||
this._buf = Buffer.alloc(size);
|
||||
this._d = new DataView(this._buf.buffer, this._buf.byteOffset);
|
||||
this._offset = 0;
|
||||
}
|
||||
|
||||
private _nextBuf() {
|
||||
|
|
Loading…
Reference in New Issue