From a1e60cb35b921fee162b545e8399738ffb4f55ab Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 22 May 2017 00:11:57 +1000 Subject: src/lauxlib.js: compare js strings --- src/lauxlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lauxlib.js b/src/lauxlib.js index 29a6ed4..559e1bc 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -144,7 +144,7 @@ const luaL_argerror = function(L, arg, extramsg) { lua.lua_getinfo(L, ['n'.charCodeAt(0)], ar); - if (ar.namewhat === lua.to_luastring('method', true)) { + if (lua.to_jsstring(ar.namewhat) === "method") { arg--; /* do not count 'self' */ if (arg === 0) /* error is in the self argument itself? */ return luaL_error(L, lua.to_luastring("calling '%s' on bad self (%s)"), ar.name, extramsg); -- cgit v1.2.3-70-g09d2