diff options
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -284,7 +284,7 @@ LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) { | |||
284 | 284 | ||
285 | LUALIB_API int luaL_execresult (lua_State *L, int stat) { | 285 | LUALIB_API int luaL_execresult (lua_State *L, int stat) { |
286 | const char *what = "exit"; /* type of termination */ | 286 | const char *what = "exit"; /* type of termination */ |
287 | if (stat == -1) /* error? */ | 287 | if (stat != 0 && errno != 0) /* error with an 'errno'? */ |
288 | return luaL_fileresult(L, 0, NULL); | 288 | return luaL_fileresult(L, 0, NULL); |
289 | else { | 289 | else { |
290 | l_inspectstat(stat, what); /* interpret result */ | 290 | l_inspectstat(stat, what); /* interpret result */ |