diff options
Diffstat (limited to 'loslib.c')
-rw-r--r-- | loslib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: loslib.c,v 1.45 2014/03/20 19:18:54 roberto Exp roberto $ | 2 | ** $Id: loslib.c,v 1.46 2014/04/29 17:05:13 roberto Exp roberto $ |
3 | ** Standard Operating System library | 3 | ** Standard Operating System library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -319,7 +319,7 @@ static int os_exit (lua_State *L) { | |||
319 | if (lua_isboolean(L, 1)) | 319 | if (lua_isboolean(L, 1)) |
320 | status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE); | 320 | status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE); |
321 | else | 321 | else |
322 | status = luaL_optint(L, 1, EXIT_SUCCESS); | 322 | status = (int)luaL_optinteger(L, 1, EXIT_SUCCESS); |
323 | if (lua_toboolean(L, 2)) | 323 | if (lua_toboolean(L, 2)) |
324 | lua_close(L); | 324 | lua_close(L); |
325 | if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */ | 325 | if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */ |