summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordenis <denisv@post.skynet.lt>2017-09-07 03:21:53 +0300
committerdenis <denisv@post.skynet.lt>2017-09-07 14:39:32 +0300
commitfc3d60b9a7cd7b8e46a9b342ec504d84c927aa08 (patch)
tree54ebb42a0a3ae512e3684561b0160cf3f2fa3d27
parentdbe21279a400253c9f106144940f1c060470961a (diff)
downloadfengari-fc3d60b9a7cd7b8e46a9b342ec504d84c927aa08.tar.gz
fengari-fc3d60b9a7cd7b8e46a9b342ec504d84c927aa08.tar.bz2
fengari-fc3d60b9a7cd7b8e46a9b342ec504d84c927aa08.zip
src/lapi.js: lua_rawseti requires only one operand on the stack when working with tables such as LUA_REGISTRYINDEX
-rw-r--r--src/lapi.js2
1 files changed, 1 insertions, 1 deletions
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]);