summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-23 18:03:14 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-27 22:14:41 +1000
commita8972da5384812ab71157ced89c6b5df6da14132 (patch)
treef0864be527e9271096b58a8c1072bc1111a64144
parentcc371ddf515fc40d7fbbb8a4e4040673de127c50 (diff)
downloadfengari-a8972da5384812ab71157ced89c6b5df6da14132.tar.gz
fengari-a8972da5384812ab71157ced89c6b5df6da14132.tar.bz2
fengari-a8972da5384812ab71157ced89c6b5df6da14132.zip
src/lapi.js: lua_pushstring should return internal copy
-rw-r--r--src/lapi.js1
1 files changed, 1 insertions, 0 deletions
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");