Skip to content

Commit 7c2d33f

Browse files
committed
src: use hex not decimal in IsArrayIndex
PR-URL: #31758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
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)