aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lauxlib.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 56700867..72806b48 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.231 2011/04/19 18:29:41 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.232 2011/05/03 16:01:57 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -251,13 +251,12 @@ LUALIB_API int luaL_execresult (lua_State *L, int stat) {
251 else { 251 else {
252 inspectstat(stat, what); /* interpret result */ 252 inspectstat(stat, what); /* interpret result */
253 if (*what == 'e' && stat == 0) /* successful termination? */ 253 if (*what == 'e' && stat == 0) /* successful termination? */
254 return luaL_fileresult(L, 1, NULL); 254 lua_pushboolean(L, 1);
255 else { /* return nil,what,code */ 255 else
256 lua_pushnil(L); 256 lua_pushnil(L);
257 lua_pushstring(L, what); 257 lua_pushstring(L, what);
258 lua_pushinteger(L, stat); 258 lua_pushinteger(L, stat);
259 return 3; 259 return 3; /* return true/nil,what,code */
260 }
261 } 260 }
262} 261}
263 262