aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lauxlib.js2
1 files changed, 1 insertions, 1 deletions
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' */