Skip to content

Commit

Permalink
this can just be a +=
Browse files Browse the repository at this point in the history
  • Loading branch information
brettjepsen committed Jan 21, 2023
1 parent 54d40ee commit 04f73eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/byteList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class ByteList {
const bitsUsed = (24 + (8 - shift)); // We will always have at least 3 bytes, but the 4th may only have a few bits
if (numberOfBits > bitsUsed) { // Do we have enough numbers to calculate the number of bits we want?
const extra = bytes.readByte();
number = (extra * 0x100000000) + number;
number += (extra * 0x100000000);
number /= Math.pow(2, shift);
return (number & (Math.pow(2, numberOfBits) - 1)) >>> 0
} else {
Expand Down

0 comments on commit 04f73eb

Please sign in to comment.