From a8972da5384812ab71157ced89c6b5df6da14132 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 23 May 2017 18:03:14 +1000 Subject: src/lapi.js: lua_pushstring should return internal copy --- src/lapi.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lapi.js b/src/lapi.js index 2341722..e9994f5 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -255,6 +255,7 @@ const lua_pushstring = function (L, s) { else { let ts = lstring.luaS_new(L, s); lobject.setsvalue2s(L, L.top, ts); + s = ts.getstr(); /* internal copy */ } L.top++; assert(L.top <= L.ci.top, "stack overflow"); -- cgit v1.2.3-70-g09d2