summaryrefslogtreecommitdiff
path: root/src/ltablib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann@users.noreply.github.com>2017-03-21 09:09:16 +0100
committerGitHub <noreply@github.com>2017-03-21 09:09:16 +0100
commit932875c87ab3f2ed2b676a98f273392661535f65 (patch)
tree505f463ecdd0b4be4f0ce3e6446183774d406783 /src/ltablib.js
parent9ac1d380dd1da894c6317845ea3234124663714b (diff)
parent6bf508f234654b1b0c7afa04797601d14c150934 (diff)
downloadfengari-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.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))