From 63fa17b6a8758569c407de21ab97a2548ed8f48d Mon Sep 17 00:00:00 2001 From: keeramis Date: Tue, 8 Aug 2023 00:17:37 +0530 Subject: [PATCH] Read bStatusWithPollTimeout correctly --- src/dfu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dfu.js b/src/dfu.js index cec07b79..1b4c39a2 100644 --- a/src/dfu.js +++ b/src/dfu.js @@ -372,7 +372,7 @@ class Dfu { let bStatusWithPollTimeout = data.readUInt32LE(0); const bStatus = (bStatusWithPollTimeout & 0xff); - bStatusWithPollTimeout &= ~(0xff); + bStatusWithPollTimeout >>= 8; const bState = data.readUInt8(4); return {