From 309cdf8b9bdf8d45196eb94bda7588ddac8915c6 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 22 May 2017 00:10:38 +1000 Subject: src/ldebug.js: namewhat should always contain a string --- src/lauxlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lauxlib.js') 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"); -- cgit v1.2.3-54-g00ecf