summaryrefslogtreecommitdiff
path: root/src/lbaselib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-29 16:38:25 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-29 16:42:11 +1000
commit7cbf48bd75d12509c876bd658f98617b753fff21 (patch)
tree5424152c733f83937e0e3f9785dad844ed9a1606 /src/lbaselib.js
parent32b88f3eb447450f0db3c089f89d895f64ff3202 (diff)
downloadfengari-7cbf48bd75d12509c876bd658f98617b753fff21.tar.gz
fengari-7cbf48bd75d12509c876bd658f98617b753fff21.tar.bz2
fengari-7cbf48bd75d12509c876bd658f98617b753fff21.zip
src/lbaselib.js: Avoid an extra copy in print
Diffstat (limited to 'src/lbaselib.js')
-rw-r--r--src/lbaselib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lbaselib.js b/src/lbaselib.js
index 5a17aa8..4ba765e 100644
--- a/src/lbaselib.js
+++ b/src/lbaselib.js
@@ -15,7 +15,7 @@ const luaB_print = function(L) {
let s = lua.lua_tolstring(L, -1);
if (s === null)
return lauxlib.luaL_error(L, lua.to_luastring("'tostring' must return a string to 'print'", true));
- if (i > 1) s = ["\t".charCodeAt(0)].concat(s);
+ if (i > 1) str.push("\t".charCodeAt(0));
str = str.concat(s);
lua.lua_pop(L, 1);
}