From fa04bd178c91d0d7cb6400618f8e3c2d980a8a16 Mon Sep 17 00:00:00 2001 From: Kurt Thiemann Date: Thu, 27 Apr 2023 09:56:15 +0200 Subject: [PATCH] fix incorrect DataView length in ArrayBufferReader --- package.json | 2 +- src/Reader/ArrayBufferReader.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b90fd4f..75828dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "armarius", - "version": "1.10.3", + "version": "1.10.4", "description": "A JavaScript library to read, write, and merge ZIP archives in web browsers.", "repository": "github:aternosorg/armarius", "type": "module", diff --git a/src/Reader/ArrayBufferReader.js b/src/Reader/ArrayBufferReader.js index eab1947..a227d93 100644 --- a/src/Reader/ArrayBufferReader.js +++ b/src/Reader/ArrayBufferReader.js @@ -15,9 +15,9 @@ export default class ArrayBufferReader extends DataReader { constructor(buffer, offset = 0, length = null) { super(); this.data = new Uint8Array(buffer); - this.view = new DataView(buffer, offset, length); - this.byteOffset = offset; this.byteLength = length ?? buffer.byteLength; + this.view = new DataView(buffer, offset, this.byteLength); + this.byteOffset = offset; } /**