From 208c92b4b3bb551db89556dbfca6cac5f6dc1661 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 22 May 2017 09:15:22 +0200 Subject: luaV_finishOp put concat results in wrong stack slot --- src/lvm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) */ -- cgit v1.2.3-70-g09d2