From 1bdde38bd24b137a240aede92363837e3d1a79b9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 5 Sep 2002 16:45:42 -0300 Subject: no more newlines at the end of error messages --- ldebug.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 55c53f9d..0cf0f963 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 1.132 2002/08/12 17:23:12 roberto Exp roberto $ +** $Id: ldebug.c,v 1.133 2002/08/20 20:03:05 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -524,14 +524,11 @@ int luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2) { static void addinfo (lua_State *L, const char *msg) { CallInfo *ci = L->ci; - if (!isLua(ci)) { /* no Lua code? */ - luaO_pushfstring(L, "%s\n", msg); /* no extra info; just add '\n' */ - } - else { /* add file:line information */ - char buff[LUA_IDSIZE]; + if (isLua(ci)) { /* is Lua code? */ + char buff[LUA_IDSIZE]; /* add file:line information */ int line = currentline(ci); luaO_chunkid(buff, getstr(getluaproto(ci)->source), LUA_IDSIZE); - luaO_pushfstring(L, "%s:%d: %s\n", buff, line, msg); + luaO_pushfstring(L, "%s:%d: %s", buff, line, msg); } } -- cgit v1.2.3-55-g6feb