From c93673f0af0ebdc5165cf0acc340f65b6c6fa786 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 29 Dec 2017 00:48:15 +1100 Subject: src/: Pass js string to luaL_opt(l)string --- src/lstrlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lstrlib.js') 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? */ -- cgit v1.2.3-54-g00ecf