]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix debug info for main chunk of stripped bytecode.
authorMike Pall <mike>
Wed, 11 Jun 2014 08:19:53 +0000 (10:19 +0200)
committerMike Pall <mike>
Wed, 11 Jun 2014 08:19:53 +0000 (10:19 +0200)
src/lj_debug.c

index 4653a4ec153908005ba263c7ad3c0cecfc430f33..effb4841e62a07cda49a584824ffda4a49e7664a 100644 (file)
@@ -463,7 +463,7 @@ int lj_debug_getinfo(lua_State *L, const char *what, lj_Debug *ar, int ext)
        lj_debug_shortname(ar->short_src, name);
        ar->linedefined = (int)firstline;
        ar->lastlinedefined = (int)(firstline + pt->numline);
-       ar->what = firstline ? "Lua" : "main";
+       ar->what = (firstline || !pt->numline) ? "Lua" : "main";
       } else {
        ar->source = "=[C]";
        ar->short_src[0] = '[';