From dbe21279a400253c9f106144940f1c060470961a Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 21 Aug 2017 17:25:54 +1000 Subject: src/lauxlib.js: Fix test for Lua functions Uninvert the condition rather than changing from C to J --- src/lauxlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ + else if (ar.what && ar.what[0] === 'L'.charCodeAt(0)) /* for Lua functions, use */ lua.lua_pushfstring(L, lua.to_luastring("function <%s:%d>"), ar.short_src, ar.linedefined); else /* nothing left... */ lua.lua_pushliteral(L, "?"); -- cgit v1.2.3-70-g09d2