summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-08 16:06:44 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-08 16:07:23 +1000
commit41ad8917ca15b275c8aca20f6e3907a08ae7ad15 (patch)
treecae6c352e557891a611f57317d3d9338ccf99493
parent8795e7df4ed371572df52c99e90b13d9e73c2f59 (diff)
downloadfengari-41ad8917ca15b275c8aca20f6e3907a08ae7ad15.tar.gz
fengari-41ad8917ca15b275c8aca20f6e3907a08ae7ad15.tar.bz2
fengari-41ad8917ca15b275c8aca20f6e3907a08ae7ad15.zip
src/lvm.js: Fix incorrect stack index in luaV_concat
-rw-r--r--src/lvm.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 8bfef40..dc128cc 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -1017,7 +1017,7 @@ const luaV_concat = function(L, total) {
L.stack[top - 2] = L.stack[top - 1];
else {
/* at least two non-empty string values; get as many as possible */
- let tl = L.stack[top-2].value.length;
+ let tl = L.stack[top-1].value.length;
/* collect total length and number of strings */
for (n = 1; n < total && tostring(L, top - n - 1); n++) {
let l = L.stack[top - n - 1].value.length;