diff options
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 | ||