From fc3d60b9a7cd7b8e46a9b342ec504d84c927aa08 Mon Sep 17 00:00:00 2001 From: denis Date: Thu, 7 Sep 2017 03:21:53 +0300 Subject: src/lapi.js: lua_rawseti requires only one operand on the stack when working with tables such as LUA_REGISTRYINDEX --- src/lapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lapi.js b/src/lapi.js index 2d30074..b7fed83 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -437,7 +437,7 @@ const lua_rawset = function(L, idx) { }; const lua_rawseti = function(L, idx, n) { - assert(2 < L.top - L.ci.funcOff, "not enough elements in the stack"); + assert(1 < L.top - L.ci.funcOff, "not enough elements in the stack"); let o = index2addr(L, idx); assert(o.ttistable(), "table expected"); ltable.luaH_setint(o.value, n, L.stack[L.top - 1]); -- cgit v1.2.3-54-g00ecf