diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lauxlib.js | 2 | ||||
| -rw-r--r-- | src/ldblib.js | 4 | ||||
| -rw-r--r-- | src/ldebug.js | 2 | 
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js index c5a3b21..5669995 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -79,7 +79,7 @@ const pushfuncname = function(L, ar) {          lua.lua_pushfstring(L, lua.to_luastring("function '%s'"), lua.lua_tostring(L, -1));          lua.lua_remove(L, -2);  /* remove name */      } -    else if (ar.namewhat)  /* is there a name from code? */ +    else if (ar.namewhat.length !== 0)  /* is there a name from code? */          lua.lua_pushfstring(L, lua.to_luastring("%s '%s'"), ar.namewhat, ar.name);  /* use it */      else if (ar.what && ar.what[0] === 'm'.charCodeAt(0))  /* main? */          lua.lua_pushliteral(L, "main chunk"); diff --git a/src/ldblib.js b/src/ldblib.js index 91dd980..3f18a27 100644 --- a/src/ldblib.js +++ b/src/ldblib.js @@ -151,8 +151,8 @@ const db_getinfo = function(L) {          settabsb(L, lua.to_luastring("isvararg", true), ar.isvararg);      }      if (options.indexOf('n'.charCodeAt(0)) > - 1) { -        settabss(L, lua.to_luastring("name", true), ar.name ? ar.name : null); -        settabss(L, lua.to_luastring("namewhat", true), ar.namewhat ? ar.namewhat : null); +        settabss(L, lua.to_luastring("name", true), ar.name); +        settabss(L, lua.to_luastring("namewhat", true), ar.namewhat);      }      if (options.indexOf('t'.charCodeAt(0)) > - 1)          settabsb(L, lua.to_luastring("istailcall", true), ar.istailcall); diff --git a/src/ldebug.js b/src/ldebug.js index b427e76..1862e55 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -242,7 +242,7 @@ const auxgetinfo = function(L, what, ar, f, ci) {              case 'n': {                  let r = getfuncname(L, ci);                  if (r === null) { -                    ar.namewhat = null; +                    ar.namewhat = [];                      ar.name = null;                  } else {                      ar.namewhat = r.funcname;  | 
