summaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-22 00:10:38 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-22 00:50:36 +1000
commit309cdf8b9bdf8d45196eb94bda7588ddac8915c6 (patch)
tree4ecb6bb30a36fe257cbe21da6bcb12add4141511 /src/lauxlib.js
parent7ac843a05895dc9722cf8e515049fbbc82b01a05 (diff)
downloadfengari-309cdf8b9bdf8d45196eb94bda7588ddac8915c6.tar.gz
fengari-309cdf8b9bdf8d45196eb94bda7588ddac8915c6.tar.bz2
fengari-309cdf8b9bdf8d45196eb94bda7588ddac8915c6.zip
src/ldebug.js: namewhat should always contain a string
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r--src/lauxlib.js2
1 files changed, 1 insertions, 1 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");