aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-08-21 17:25:54 +1000
committerdaurnimator <quae@daurnimator.com>2017-08-21 17:29:13 +1000
commitdbe21279a400253c9f106144940f1c060470961a (patch)
treee25f73d154025ba13daa8092b1b23dc13a10a25e
parent22220c5992ed660ec6ed805b4275f9ec1378f60c (diff)
downloadfengari-dbe21279a400253c9f106144940f1c060470961a.tar.gz
fengari-dbe21279a400253c9f106144940f1c060470961a.tar.bz2
fengari-dbe21279a400253c9f106144940f1c060470961a.zip
src/lauxlib.js: Fix test for Lua functions
Uninvert the condition rather than changing from C to J
-rw-r--r--src/lauxlib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index be11ba0..b551d4f 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -82,7 +82,7 @@ const pushfuncname = function(L, ar) {
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");
- else if (ar.what && ar.what[0] != 'C'.charCodeAt(0)) /* for Lua functions, use <file:line> */
+ else if (ar.what && ar.what[0] === 'L'.charCodeAt(0)) /* for Lua functions, use <file:line> */
lua.lua_pushfstring(L, lua.to_luastring("function <%s:%d>"), ar.short_src, ar.linedefined);
else /* nothing left... */
lua.lua_pushliteral(L, "?");