summaryrefslogtreecommitdiff
path: root/src/lparser.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-24 12:01:42 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-24 12:09:49 +0200
commit656758c86ad929b07bb6422eb0f44cf9f2347aac (patch)
tree9463a52cfa7e49245054577804f1bd6dcaf22ff8 /src/lparser.js
parentd15e00af0798783bdce5e27d2ab43de3ecb3fa4e (diff)
downloadfengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.tar.gz
fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.tar.bz2
fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.zip
Use maximum 32bit number instead of Number.MAX_SAFE_INTEGER
Diffstat (limited to 'src/lparser.js')
-rw-r--r--src/lparser.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lparser.js b/src/lparser.js
index a0d671b..fba5f94 100644
--- a/src/lparser.js
+++ b/src/lparser.js
@@ -638,7 +638,7 @@ const recfield = function(ls, cc) {
let val = new expdesc();
if (ls.t.token === R.TK_NAME) {
- checklimit(fs, cc.nh, Number.MAX_SAFE_INTEGER, lua.to_luastring("items in a constructor", true));
+ checklimit(fs, cc.nh, llimit.MAX_INT, lua.to_luastring("items in a constructor", true));
checkname(ls, key);
} else /* ls->t.token === '[' */
yindex(ls, key);
@@ -676,7 +676,7 @@ const lastlistfield = function(fs, cc) {
const listfield = function(ls, cc) {
/* listfield -> exp */
expr(ls, cc.v);
- checklimit(ls.fs, cc.na, Number.MAX_SAFE_INTEGER, lua.to_luastring("items in a constructor", true));
+ checklimit(ls.fs, cc.na, llimit.MAX_INT, lua.to_luastring("items in a constructor", true));
cc.na++;
cc.tostore++;
};