diff options
| -rw-r--r-- | ldo.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -273,11 +273,9 @@ LUA_API int lua_loadfile (lua_State *L, const char *filename) { | |||
| 273 | LUA_API int lua_loadbuffer (lua_State *L, const char *buff, size_t size, | 273 | LUA_API int lua_loadbuffer (lua_State *L, const char *buff, size_t size, |
| 274 | const char *name) { | 274 | const char *name) { |
| 275 | ZIO z; | 275 | ZIO z; |
| 276 | int status; | ||
| 277 | if (!name) name = "?"; | 276 | if (!name) name = "?"; |
| 278 | luaZ_mopen(&z, buff, size, name); | 277 | luaZ_mopen(&z, buff, size, name); |
| 279 | status = protectedparser(L, &z, buff[0]==LUA_SIGNATURE[0]); | 278 | return protectedparser(L, &z, buff[0]==LUA_SIGNATURE[0]); |
| 280 | return status; | ||
| 281 | } | 279 | } |
| 282 | 280 | ||
| 283 | 281 | ||
| @@ -330,7 +328,7 @@ void luaD_breakrun (lua_State *L, int errcode) { | |||
| 330 | longjmp(L->errorJmp->b, 1); | 328 | longjmp(L->errorJmp->b, 1); |
| 331 | } | 329 | } |
| 332 | else { | 330 | else { |
| 333 | if (errcode != LUA_ERRMEM) | 331 | if (errcode != LUA_ERRMEM && errcode != LUA_ERRERR) |
| 334 | message(L, "unable to recover; exiting\n"); | 332 | message(L, "unable to recover; exiting\n"); |
| 335 | exit(EXIT_FAILURE); | 333 | exit(EXIT_FAILURE); |
| 336 | } | 334 | } |
