summaryrefslogtreecommitdiff
path: root/src/lfunc.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lfunc.js')
-rw-r--r--src/lfunc.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index bc88702..bde96d7 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -43,9 +43,10 @@ class UpVal {
}
setval(L, ra) {
+ let o = L.stack[ra];
if (this.v !== null) {
- this.L.stack[this.v] = L.stack[ra];
- } else this.u.value = L.stack[ra];
+ this.L.stack[this.v] = new lobject.TValue(o.type, o.value);
+ } else this.u.value = new lobject.TValue(o.type, o.value);
}
isopen() {