diff options
author | Lua Team <team@lua.org> | 2008-01-17 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2008-01-17 12:00:00 +0000 |
commit | b2874e1bcdc4d4a56d8a232a88d5e17c6a9826f5 (patch) | |
tree | c173f097145da6d8df8e8fea09b6ec6bba8c5476 /src/lua.c | |
parent | f3572f5f7e364810f6ac5f99e0eced99c4722418 (diff) | |
download | lua-github-b2874e1bcdc4d4a56d8a232a88d5e17c6a9826f5.tar.gz |
Lua 5.1.3-rc15.1.3-rc1
Diffstat (limited to 'src/lua.c')
-rw-r--r-- | src/lua.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.160 2006/06/02 15:34:00 roberto Exp $ +** $Id: lua.c,v 1.160.1.2 2007/12/28 15:32:23 roberto Exp $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -74,6 +74,8 @@ static int report (lua_State *L, int status) { static int traceback (lua_State *L) { + if (!lua_isstring(L, 1)) /* 'message' not a string? */ + return 1; /* keep it intact */ lua_getfield(L, LUA_GLOBALSINDEX, "debug"); if (!lua_istable(L, -1)) { lua_pop(L, 1); @@ -144,7 +146,7 @@ static int dostring (lua_State *L, const char *s, const char *name) { static int dolibrary (lua_State *L, const char *name) { lua_getglobal(L, "require"); lua_pushstring(L, name); - return report(L, lua_pcall(L, 1, 0, 0)); + return report(L, docall(L, 1, 1)); } |