From 101cee3032918bae8a5fa9dfc334c478c4aa15f6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 13 Dec 2001 16:11:02 -0200 Subject: LUA_ERRERR also cannot generate error message --- ldo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ldo.c b/ldo.c index 6f7a32f9..e46f84a3 100644 --- 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); } -- cgit v1.2.3-55-g6feb