summaryrefslogtreecommitdiff
path: root/src/lstrlib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-29 00:48:15 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-29 02:32:41 +1100
commitc93673f0af0ebdc5165cf0acc340f65b6c6fa786 (patch)
tree9da0e536d0cb10e25fc4fe8df4705f87326136af /src/lstrlib.js
parentf9375fcb71171d7b18190fa59ec402f7f68e26dd (diff)
downloadfengari-c93673f0af0ebdc5165cf0acc340f65b6c6fa786.tar.gz
fengari-c93673f0af0ebdc5165cf0acc340f65b6c6fa786.tar.bz2
fengari-c93673f0af0ebdc5165cf0acc340f65b6c6fa786.zip
src/: Pass js string to luaL_opt(l)string
Diffstat (limited to 'src/lstrlib.js')
-rw-r--r--src/lstrlib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js
index 362942d..a8a017f 100644
--- a/src/lstrlib.js
+++ b/src/lstrlib.js
@@ -617,7 +617,7 @@ const str_rep = function(L) {
let s = lauxlib.luaL_checkstring(L, 1);
let l = s.length;
let n = lauxlib.luaL_checkinteger(L, 2);
- let sep = lauxlib.luaL_optstring(L, 3, lua.to_luastring(""));
+ let sep = lauxlib.luaL_optstring(L, 3, "");
let lsep = sep.length;
if (n <= 0) lua.lua_pushliteral(L, "");
else if (l + lsep < l || l + lsep > MAXSIZE / n) /* may overflow? */