This commit is contained in:
Roberto Ierusalimschy 2002-09-16 16:18:01 -03:00
parent afe1305b1a
commit 8dae071f42
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldblib.c,v 1.68 2002/08/16 14:45:18 roberto Exp roberto $ ** $Id: ldblib.c,v 1.69 2002/09/05 19:45:42 roberto Exp roberto $
** Interface from Lua to its debug API ** Interface from Lua to its debug API
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -198,7 +198,8 @@ static int errorfb (lua_State *L) {
if (lua_gettop(L) == 0) if (lua_gettop(L) == 0)
lua_pushliteral(L, ""); lua_pushliteral(L, "");
else if (!lua_isstring(L, 1)) return 1; /* no string message */ else if (!lua_isstring(L, 1)) return 1; /* no string message */
lua_pushliteral(L, "\nstack traceback:"); else lua_pushliteral(L, "\n");
lua_pushliteral(L, "stack traceback:");
while (lua_getstack(L, level++, &ar)) { while (lua_getstack(L, level++, &ar)) {
if (level > LEVELS1 && firstpart) { if (level > LEVELS1 && firstpart) {
/* no more than `LEVELS2' more levels? */ /* no more than `LEVELS2' more levels? */