lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 101cee3032918bae8a5fa9dfc334c478c4aa15f6
parent eb7312d9be8286b8be3b929136d7dc34f50ef822
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 13 Dec 2001 16:10:40 -0200

LUA_ERRERR also cannot generate error message

Diffstat:
Mldo.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ldo.c b/ldo.c @@ -273,11 +273,9 @@ LUA_API int lua_loadfile (lua_State *L, const char *filename) { LUA_API int lua_loadbuffer (lua_State *L, const char *buff, size_t size, const char *name) { ZIO z; - int status; if (!name) name = "?"; luaZ_mopen(&z, buff, size, name); - status = protectedparser(L, &z, buff[0]==LUA_SIGNATURE[0]); - return status; + return protectedparser(L, &z, buff[0]==LUA_SIGNATURE[0]); } @@ -330,7 +328,7 @@ void luaD_breakrun (lua_State *L, int errcode) { longjmp(L->errorJmp->b, 1); } else { - if (errcode != LUA_ERRMEM) + if (errcode != LUA_ERRMEM && errcode != LUA_ERRERR) message(L, "unable to recover; exiting\n"); exit(EXIT_FAILURE); }