From 31e63f6c63d785ba3456709bcea91760e8a6c00b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 31 Aug 2023 02:23:49 -0400 Subject: [PATCH] fix: _newBuf needs to reset offset to 0 --- src/serialization/pack.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/serialization/pack.ts b/src/serialization/pack.ts index ff2ee44..d5f1b7e 100644 --- a/src/serialization/pack.ts +++ b/src/serialization/pack.ts @@ -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() {