aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-30 15:03:51 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-30 15:03:51 +1000
commit95e3a634e4bbf23dadc52bb026ede51b1ef3e7eb (patch)
tree6261126cfee42a66bd06931efd09845f4b29ba2a /src
parente7ba844bfaba3af9863b79957ec28cdc0f751d7d (diff)
downloadfengari-95e3a634e4bbf23dadc52bb026ede51b1ef3e7eb.tar.gz
fengari-95e3a634e4bbf23dadc52bb026ede51b1ef3e7eb.tar.bz2
fengari-95e3a634e4bbf23dadc52bb026ede51b1ef3e7eb.zip
src/lapi.js: Clean stack top in lua_settable
Diffstat (limited to 'src')
-rw-r--r--src/lapi.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js
index 228bba1..ceafa4a 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -404,7 +404,8 @@ const lua_settable = function(L, idx) {
let t = index2addr(L, idx);
lvm.settable(L, t, L.stack[L.top - 2], L.stack[L.top - 1]);
- L.top -= 2;
+ delete L.stack[--L.top];
+ delete L.stack[--L.top];
};
const lua_setfield = function(L, idx, k) {