Skip to content

Commit

Permalink
Don't sign-extend unsigned input in fromInt(). (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgpnw committed Oct 22, 2021
1 parent ee79b89 commit 0e50ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/long.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function fromInt(value, unsigned) {
if (cachedObj)
return cachedObj;
}
obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
obj = fromBits(value, 0, true);
if (cache)
UINT_CACHE[value] = obj;
return obj;
Expand Down

0 comments on commit 0e50ccb

Please sign in to comment.