Skip to content

Commit 0e50ccb

Browse files
authored
Don't sign-extend unsigned input in fromInt(). (#94)
1 parent ee79b89 commit 0e50ccb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/long.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function fromInt(value, unsigned) {
125125
if (cachedObj)
126126
return cachedObj;
127127
}
128-
obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
128+
obj = fromBits(value, 0, true);
129129
if (cache)
130130
UINT_CACHE[value] = obj;
131131
return obj;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy