aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldblib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldblib.c b/ldblib.c
index 329cb23d..7fbff55d 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.54 2002/06/03 17:47:18 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.55 2002/06/05 17:24:04 roberto Exp roberto $
3** Interface from Lua to its debug API 3** Interface from Lua to its debug API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -185,7 +185,8 @@ static int errorfb (lua_State *L) {
185 int level = 1; /* skip level 0 (it's this function) */ 185 int level = 1; /* skip level 0 (it's this function) */
186 int firstpart = 1; /* still before eventual `...' */ 186 int firstpart = 1; /* still before eventual `...' */
187 lua_Debug ar; 187 lua_Debug ar;
188 luaL_check_string(L, 1); 188 if (!lua_isstring(L, 1))
189 return lua_gettop(L);
189 lua_settop(L, 1); 190 lua_settop(L, 1);
190 lua_pushliteral(L, "\n"); 191 lua_pushliteral(L, "\n");
191 lua_pushliteral(L, "stack traceback:\n"); 192 lua_pushliteral(L, "stack traceback:\n");