aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-14 11:26:24 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-14 11:27:45 +0200
commitd8b080f555dbb9e90dd6d4908b6263910f80528f (patch)
tree606375e6bbb97b2fbcc5970475264a89dbb5442d /src
parent43c97cbc2904d2bac87c61515bbc16c38a091548 (diff)
downloadfengari-d8b080f555dbb9e90dd6d4908b6263910f80528f.tar.gz
fengari-d8b080f555dbb9e90dd6d4908b6263910f80528f.tar.bz2
fengari-d8b080f555dbb9e90dd6d4908b6263910f80528f.zip
Fixed bad UpVal.setVal
We were making the upval point to the slot of the stack from which the value to set was
Diffstat (limited to 'src')
-rw-r--r--src/lfunc.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index 032f653..bc88702 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -45,7 +45,6 @@ class UpVal {
setval(L, ra) {
if (this.v !== null) {
this.L.stack[this.v] = L.stack[ra];
- this.v = ra;
} else this.u.value = L.stack[ra];
}
@@ -138,4 +137,4 @@ module.exports.findupval = findupval;
module.exports.luaF_close = luaF_close;
module.exports.luaF_getlocalname = luaF_getlocalname;
module.exports.luaF_initupvals = luaF_initupvals;
-module.exports.luaF_newLclosure = luaF_newLclosure; \ No newline at end of file
+module.exports.luaF_newLclosure = luaF_newLclosure;