diff --git a/src/stream.ts b/src/stream.ts index 2ed6a8a..7b37418 100644 --- a/src/stream.ts +++ b/src/stream.ts @@ -418,15 +418,15 @@ export class TypedStreamReader implements Iterator { } else if (head == TAG_INTEGER_4) { if (this.byteOrder == "LE") { if (signed) { - return this.readExact(2).readInt32LE(); + return this.readExact(4).readInt32LE(); } else { - return this.readExact(2).readUint32LE(); + return this.readExact(4).readUint32LE(); } } else { if (signed) { - return this.readExact(2).readInt32BE(); + return this.readExact(4).readInt32BE(); } else { - return this.readExact(2).readUint32BE(); + return this.readExact(4).readUint32BE(); } } } else {