From fc08312ebf8cf01a53b4826acce0f1c3aedcdc53 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Wed, 12 Apr 2017 07:55:38 +0200 Subject: debug.traceback --- src/lapi.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lapi.js') 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) { -- cgit v1.2.3-54-g00ecf