Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Vohr <shelley.vohr@gmail.com>2020-02-13 01:14:06 +0300
committerShelley Vohr <shelley.vohr@gmail.com>2020-02-17 23:49:22 +0300
commit7c2d33f38f451e92ad20f8bbb577a7173abe21d3 (patch)
treea5586ae9b2447fb3b1bc507789cd96d547004775
parenta095ef0d52a46c0504247a2038abcd2117855a47 (diff)
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>
-rw-r--r--src/module_wrap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index 30a2bf96366..0bc32f7846b 100644
--- a/src/module_wrap.cc
+++ b/src/module_wrap.cc
@@ -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,