aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-11-09 11:30:46 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-11-09 12:57:55 +0100
commit3033341b741cfb256baf91acf1f257a7f1ed6f7b (patch)
tree0799aa4a174421bba225e4b6d47a65c9bbfb2fe2 /src
parent97a52383d4194678b781e8826c6512fc6fe40288 (diff)
downloadfengari-3033341b741cfb256baf91acf1f257a7f1ed6f7b.tar.gz
fengari-3033341b741cfb256baf91acf1f257a7f1ed6f7b.tar.bz2
fengari-3033341b741cfb256baf91acf1f257a7f1ed6f7b.zip
src/ltablib.js: sort max interval should be LUA_MAXINTEGER
Closes #1
Diffstat (limited to 'src')
-rw-r--r--src/ltablib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ltablib.js b/src/ltablib.js
index 6d89acd..05c9c09 100644
--- a/src/ltablib.js
+++ b/src/ltablib.js
@@ -291,7 +291,7 @@ const auxsort = function(L, lo, up, rnd) {
const sort = function(L) {
let n = aux_getn(L, 1, TAB_RW);
if (n > 1) { /* non-trivial interval? */
- lauxlib.luaL_argcheck(L, n < Number.MAX_SAFE_INTEGER, 1, lua.to_luastring("array too big", true));
+ lauxlib.luaL_argcheck(L, n < luaconf.LUA_MAXINTEGER, 1, lua.to_luastring("array too big", true));
if (!lua.lua_isnoneornil(L, 2)) /* is there a 2nd argument? */
lauxlib.luaL_checktype(L, 2, lua.LUA_TFUNCTION); /* must be a function */
lua.lua_settop(L, 2); /* make sure there are two arguments */