Skip to content

Commit 0e45d26

Browse files
committed
tweaks
1 parent 11a76c4 commit 0e45d26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Decoder.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,8 @@ export class Decoder {
502502
throw MORE_DATA;
503503
}
504504

505-
const object = new Uint8Array(this.view.buffer, this.view.byteOffset + this.pos + headOffset, byteLength);
505+
const offset = this.pos + headOffset;
506+
const object = this.bytes.subarray(offset, offset + byteLength);
506507
this.pos += headOffset + byteLength;
507508
return object;
508509
}

0 commit comments

Comments
 (0)