aboutsummaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lapi.js b/src/lapi.js
index 7f8cda8..fcb07d6 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -173,9 +173,8 @@ const lua_rotate = function(L, idx, n) {
};
const lua_copy = function(L, fromidx, toidx) {
- let fr = index2addr_(L, fromidx);
- let to = index2addr_(L, toidx);
- L.stack[to] = fr;
+ let from = index2addr(L, fromidx);
+ L.stack[index2addr_(L, toidx)] = new TValue(from.type, from.value);
};
const lua_remove = function(L, idx) {