From ccc602683fa0928e35ec5fbb81af10884679f033 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 12 Feb 2020 14:14:06 -0800 Subject: [PATCH] src: use hex not decimal in IsArrayIndex PR-URL: https://github.com/nodejs/node/pull/31758 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: David Carlier Reviewed-By: Denys Otrishko Reviewed-By: Anna Henningsen --- src/module_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module_wrap.cc b/src/module_wrap.cc index b53aab6dc16c7a..b3ff343508be3b 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -923,7 +923,7 @@ bool IsArrayIndex(Environment* env, Local 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 ResolveExportsTarget(Environment* env,