src: use hex not decimal in IsArrayIndex

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Shelley Vohr committed 2020-02-17 12:49:22 -08:00
1 parent a095ef0d52
commit 7c2d33f38f
1 file changed
+1 -1
+1 -1
View File
@@ -955,7 +955,7 @@ bool IsArrayIndex(Environment* env, Local<Value> p) {
if (!n->ToInteger(context).ToLocal(&cmp_integer)) {
return false;
}
return n_dbl > 0 && n_dbl < (2 ^ 32) - 1;
return n_dbl > 0 && n_dbl < (1LL << 32) - 1;
}
Maybe<URL> ResolveExportsTarget(Environment* env,