diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-05-10 17:26:37 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-05-10 17:26:37 -0300 |
commit | 37cd986532e2be00fe2504a1ebe0f1120ccc3979 (patch) | |
tree | 9fe4d552b87503999f58cfccd05a7e49fc44a8ba /liolib.c | |
parent | a17dd24b34cdbf2fd88773c743f6086059d8a272 (diff) | |
download | lua-37cd986532e2be00fe2504a1ebe0f1120ccc3979.tar.gz lua-37cd986532e2be00fe2504a1ebe0f1120ccc3979.tar.bz2 lua-37cd986532e2be00fe2504a1ebe0f1120ccc3979.zip |
in `time', uses default if `isdst' is absent
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.49 2003/10/10 13:29:28 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.50 2004/04/30 20:13:38 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -569,7 +569,7 @@ static void setboolfield (lua_State *L, const char *key, int value) { | |||
569 | static int getboolfield (lua_State *L, const char *key) { | 569 | static int getboolfield (lua_State *L, const char *key) { |
570 | int res; | 570 | int res; |
571 | lua_getfield(L, -1, key); | 571 | lua_getfield(L, -1, key); |
572 | res = lua_toboolean(L, -1); | 572 | res = lua_isnil(L, -1) ? -1 : lua_toboolean(L, -1); |
573 | lua_pop(L, 1); | 573 | lua_pop(L, 1); |
574 | return res; | 574 | return res; |
575 | } | 575 | } |