summaryrefslogtreecommitdiff
path: root/src/lparser.js
diff options
context:
space:
mode:
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++;
};