diff options
Diffstat (limited to '')
-rw-r--r-- | ldebug.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.132 2002/08/12 17:23:12 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.133 2002/08/20 20:03:05 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -524,14 +524,11 @@ int luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2) { | |||
524 | 524 | ||
525 | static void addinfo (lua_State *L, const char *msg) { | 525 | static void addinfo (lua_State *L, const char *msg) { |
526 | CallInfo *ci = L->ci; | 526 | CallInfo *ci = L->ci; |
527 | if (!isLua(ci)) { /* no Lua code? */ | 527 | if (isLua(ci)) { /* is Lua code? */ |
528 | luaO_pushfstring(L, "%s\n", msg); /* no extra info; just add '\n' */ | 528 | char buff[LUA_IDSIZE]; /* add file:line information */ |
529 | } | ||
530 | else { /* add file:line information */ | ||
531 | char buff[LUA_IDSIZE]; | ||
532 | int line = currentline(ci); | 529 | int line = currentline(ci); |
533 | luaO_chunkid(buff, getstr(getluaproto(ci)->source), LUA_IDSIZE); | 530 | luaO_chunkid(buff, getstr(getluaproto(ci)->source), LUA_IDSIZE); |
534 | luaO_pushfstring(L, "%s:%d: %s\n", buff, line, msg); | 531 | luaO_pushfstring(L, "%s:%d: %s", buff, line, msg); |
535 | } | 532 | } |
536 | } | 533 | } |
537 | 534 | ||