summaryrefslogtreecommitdiff
path: root/src/ltablib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-21 07:33:40 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-21 08:17:14 +0100
commit2cc93b924a21030fcd6f5dc96f287bbf13f987f4 (patch)
treea831301ac901f51e75e2e9f71d822b8ad49a3212 /src/ltablib.js
parent5f5ba74ace8a956ae48a9f0b182a157052c2546e (diff)
downloadfengari-2cc93b924a21030fcd6f5dc96f287bbf13f987f4.tar.gz
fengari-2cc93b924a21030fcd6f5dc96f287bbf13f987f4.tar.bz2
fengari-2cc93b924a21030fcd6f5dc96f287bbf13f987f4.zip
string.gmatch
Diffstat (limited to 'src/ltablib.js')
-rw-r--r--src/ltablib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ltablib.js b/src/ltablib.js
index 10d66eb..20fdf95 100644
--- a/src/ltablib.js
+++ b/src/ltablib.js
@@ -168,7 +168,7 @@ const pack = function(L) {
const unpack = function(L) {
let i = lauxlib.luaL_optinteger(L, 2, 1);
- let e = lauxlib.luaL_opt(L, lauxlib.luaL_checkinteger, 3, lapi.lua_len(L, 1));
+ let e = lauxlib.luaL_opt(L, lauxlib.luaL_checkinteger, 3, lauxlib.luaL_len(L, 1));
if (i > e) return 0; /* empty range */
let n = e - i; /* number of elements minus 1 (avoid overflows) */
if (n >= Number.MAX_SAFE_INTEGER || !lapi.lua_checkstack(L, ++n))