From 78f764030414e5c45ea059a5f582885da0282e39 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 23 May 2017 18:02:28 +1000 Subject: Introduce setsvalue2s --- src/lvm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lvm.js') diff --git a/src/lvm.js b/src/lvm.js index ecacd92..b9c2972 100644 --- a/src/lvm.js +++ b/src/lvm.js @@ -967,7 +967,7 @@ const tostring = function(L, i) { if (o.ttisstring()) return true; if (cvt2str(o)) { - L.stack[i] = lobject.luaO_tostring(L, o); + lobject.setsvalue2s(L, i, lobject.luaO_tostring(L, o)); return true; } @@ -1011,7 +1011,7 @@ const luaV_concat = function(L, total) { delete L.stack[top - n - 1]; } let ts = lstring.luaS_bless(L, Array.prototype.concat.apply([], toconcat)); - L.stack[top - n] = new lobject.TValue(CT.LUA_TLNGSTR, ts); + lobject.setsvalue2s(L, top - n, ts); } total -= n - 1; /* got 'n' strings to create 1 new */ L.top -= n - 1; /* popped 'n' strings and pushed one */ -- cgit v1.2.3-54-g00ecf