From 41ad8917ca15b275c8aca20f6e3907a08ae7ad15 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 8 May 2017 16:06:44 +1000 Subject: src/lvm.js: Fix incorrect stack index in luaV_concat --- 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 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; -- cgit v1.2.3-70-g09d2