summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-22 09:15:22 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-22 09:15:22 +0200
commit208c92b4b3bb551db89556dbfca6cac5f6dc1661 (patch)
tree457106f953a5811be559ea5414d87f1bb74f80fb /src
parent6e413992b24c760b149a8abf580811cc1d057d19 (diff)
downloadfengari-208c92b4b3bb551db89556dbfca6cac5f6dc1661.tar.gz
fengari-208c92b4b3bb551db89556dbfca6cac5f6dc1661.tar.bz2
fengari-208c92b4b3bb551db89556dbfca6cac5f6dc1661.zip
luaV_finishOp put concat results in wrong stack slot
Diffstat (limited to 'src')
-rw-r--r--src/lvm.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 6e1012c..4d3d5fb 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -54,7 +54,7 @@ const luaV_finishOp = function(L) {
let top = L.top - 1; /* top when 'luaT_trybinTM' was called */
let b = inst.B; /* first element to concatenate */
let total = top - 1 - (base + b); /* yet to concatenate */
- L.stack[L.top - 2] = L.stack[top]; /* put TM result in proper position */
+ L.stack[top - 2] = L.stack[top]; /* put TM result in proper position */
if (total > 1) { /* are there elements to concat? */
L.top = top - 1; /* top is one after last element (at top-2) */
luaV_concat(L, total); /* concat them (may yield again) */