From 5ab862d703db63fbc91ccbedfc522097e949f961 Mon Sep 17 00:00:00 2001 From: chopster44 Date: Mon, 1 Dec 2025 21:06:56 +0000 Subject: [PATCH] loading the file progress correctly --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5bdce33..8eddcf4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -288,7 +288,9 @@ export default class Updater { else { // should be the file progress let fileProgressView = new Uint32Array(rawData); - this._fileProgress += fileProgressView[0]; + this._fileProgress += (dataView[3] << 24) | + (dataView[2] << 16) | + (dataView[1] << 8) | dataView[0]; this.sendNextPacket(); progressCallback(`Recieved progress ${fileProgressView[0]}; Sending (${Math.floor((this._fileProgress *100)/this._fileSize)}%), ${this._fileProgress} / ${this._fileSize}`); }