Skip to content

Commit 6cb838e

Browse files
committed
src: use hex not decimal in IsArrayIndex
1 parent a484f1a commit 6cb838e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/module_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ bool IsArrayIndex(Environment* env, Local<Value> p) {
951951
if (!n->ToInteger(context).ToLocal(&cmp_integer)) {
952952
return false;
953953
}
954-
return n_dbl > 0 && n_dbl < (2 ^ 32) - 1;
954+
return n_dbl > 0 && n_dbl < (1LL << 32) - 1;
955955
}
956956

957957
Maybe<URL> ResolveExportsTarget(Environment* env,

0 commit comments

Comments
 (0)