Skip to content

Commit 38d8b75

Browse files
committed
fix incorrect bigint handling
1 parent b5ad49a commit 38d8b75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/number_utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ export const NumberUtils: NumberUtils = {
9090
eslint-disable-next-line no-restricted-globals
9191
-- This is allowed since this helper should not be called unless bigint features are enabled
9292
*/
93-
return (BigInt(hi) << BigInt(32)) + BigInt(lo);
93+
const intermediate = (BigInt(hi) << BigInt(32)) + BigInt(lo);
94+
return BigInt.asIntN(64, intermediate);
9495
},
9596

9697
/** Reads a little-endian 64-bit float from source */

0 commit comments

Comments
 (0)