aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lauxlib.c b/lauxlib.c
index a5e9e4b5..f2ba704f 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -284,7 +284,7 @@ LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
284 284
285LUALIB_API int luaL_execresult (lua_State *L, int stat) { 285LUALIB_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 */