aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 014e7052..5a040ac6 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -249,7 +249,7 @@ LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
249 return 1; 249 return 1;
250 } 250 }
251 else { 251 else {
252 lua_pushnil(L); 252 luaL_pushfail(L);
253 if (fname) 253 if (fname)
254 lua_pushfstring(L, "%s: %s", fname, strerror(en)); 254 lua_pushfstring(L, "%s: %s", fname, strerror(en));
255 else 255 else
@@ -291,10 +291,10 @@ LUALIB_API int luaL_execresult (lua_State *L, int stat) {
291 if (*what == 'e' && stat == 0) /* successful termination? */ 291 if (*what == 'e' && stat == 0) /* successful termination? */
292 lua_pushboolean(L, 1); 292 lua_pushboolean(L, 1);
293 else 293 else
294 lua_pushnil(L); 294 luaL_pushfail(L);
295 lua_pushstring(L, what); 295 lua_pushstring(L, what);
296 lua_pushinteger(L, stat); 296 lua_pushinteger(L, stat);
297 return 3; /* return true/nil,what,code */ 297 return 3; /* return true/fail,what,code */
298 } 298 }
299} 299}
300 300