Skip to content

Commit

Permalink
Fix shift in uintEncode (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
aesx86 authored Dec 14, 2024
1 parent fc340a1 commit 81c56b2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/internal/encoding/uint.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ const uintEncode = (arr) => {
let num = 0;

for (let i = 0; i < arr.length; i++) {
if (arr[i] !== 0) {
num *= 256;
num += arr[i];
}
num *= 256;
num += arr[i];
}

return num;
Expand Down

0 comments on commit 81c56b2

Please sign in to comment.