From 4cf090d7ede6aa3153ad912c580cfb07b1e60a9d Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 3 May 2017 19:06:36 +1000 Subject: luaL_Buffer constructor shouldn't take a lua state It gets set in luaL_buffinit --- 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 6121804..b5f235f 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -1333,7 +1333,7 @@ const str_gsub = function(L) { let anchor = p[0] === '^'.charCodeAt(0); let n = 0; /* replacement count */ let ms = new MatchState(L); - let b = new lauxlib.luaL_Buffer(L); + let b = new lauxlib.luaL_Buffer(); lauxlib.luaL_argcheck(L, tr === lua.LUA_TNUMBER || tr === lua.LUA_TSTRING || tr === lua.LUA_TFUNCTION || tr === lua.LUA_TTABLE, 3, lua.to_luastring("string/function/table expected", true)); lauxlib.luaL_buffinit(L, b); -- cgit v1.2.3-54-g00ecf