From 9207ba91e1182f6030ad2e5e5dc0e71d8012d3da Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 22 May 2017 00:11:14 +1000 Subject: src/lauxlib.js: lua_getinfo takes a lua string (array) not a JS string --- src/lauxlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lauxlib.js b/src/lauxlib.js index 5669995..29a6ed4 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -142,7 +142,7 @@ const luaL_argerror = function(L, arg, extramsg) { if (!lua.lua_getstack(L, 0, ar)) /* no stack frame? */ return luaL_error(L, lua.to_luastring("bad argument #%d (%s)"), arg, extramsg); - lua.lua_getinfo(L, 'n', ar); + lua.lua_getinfo(L, ['n'.charCodeAt(0)], ar); if (ar.namewhat === lua.to_luastring('method', true)) { arg--; /* do not count 'self' */ -- cgit v1.2.3-70-g09d2