aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ldebug.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ldebug.js b/src/ldebug.js
index e0e2366..7de5cdc 100644
--- a/src/ldebug.js
+++ b/src/ldebug.js
@@ -152,9 +152,8 @@ const lua_setlocal = function(L, ar, n) {
let name = local.name;
let pos = local.pos;
if (name) {
- L.stack[pos].type = L.stack[L.top - 1].type;
- L.stack[pos].value = L.stack[L.top - 1].value;
- L.top--; /* pop value */
+ L.stack[pos] = L.stack[L.top - 1];
+ delete L.stack[--L.top]; /* pop value */
}
swapextra(L);
return name;