diff options
author | Benoit Giannangeli <giann@users.noreply.github.com> | 2017-03-21 09:09:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-21 09:09:16 +0100 |
commit | 932875c87ab3f2ed2b676a98f273392661535f65 (patch) | |
tree | 505f463ecdd0b4be4f0ce3e6446183774d406783 /src/ltablib.js | |
parent | 9ac1d380dd1da894c6317845ea3234124663714b (diff) | |
parent | 6bf508f234654b1b0c7afa04797601d14c150934 (diff) | |
download | fengari-932875c87ab3f2ed2b676a98f273392661535f65.tar.gz fengari-932875c87ab3f2ed2b676a98f273392661535f65.tar.bz2 fengari-932875c87ab3f2ed2b676a98f273392661535f65.zip |
Merge pull request #8 from giann/feature/match
Feature/match
Diffstat (limited to 'src/ltablib.js')
-rw-r--r-- | src/ltablib.js | 2 |
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)) |