Skip to content

Commit 7c2d33f

Browse files
committed
src: use hex not decimal in IsArrayIndex
PR-URL: #31758 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent a095ef0 commit 7c2d33f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/module_wrap.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ bool IsArrayIndex(Environment* env, Local<Value> p) {
955955
if (!n->ToInteger(context).ToLocal(&cmp_integer)) {
956956
return false;
957957
}
958-
return n_dbl > 0 && n_dbl < (2 ^ 32) - 1;
958+
return n_dbl > 0 && n_dbl < (1LL << 32) - 1;
959959
}
960960

961961
Maybe<URL> ResolveExportsTarget(Environment* env,

0 commit comments

Comments
 (0)