From 95e3a634e4bbf23dadc52bb026ede51b1ef3e7eb Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 30 May 2017 15:03:51 +1000 Subject: src/lapi.js: Clean stack top in lua_settable --- src/lapi.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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) { -- cgit v1.2.3-70-g09d2