aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-09-09 15:22:46 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-09-09 15:22:46 -0300
commit1e6a559b29dbbafaa90a1035f4a265cde0b5791c (patch)
treee0d5e844ea0193b35383692d821e821be960ebe4
parent2d2f955763c3ff7bee92ca52043ebf5fb23e72e0 (diff)
downloadlua-1e6a559b29dbbafaa90a1035f4a265cde0b5791c.tar.gz
lua-1e6a559b29dbbafaa90a1035f4a265cde0b5791c.tar.bz2
lua-1e6a559b29dbbafaa90a1035f4a265cde0b5791c.zip
does not set isdst when undefined
-rw-r--r--loslib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/loslib.c b/loslib.c
index ca09f699..caf75543 100644
--- a/loslib.c
+++ b/loslib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loslib.c,v 1.11 2005/08/15 14:12:32 roberto Exp roberto $ 2** $Id: loslib.c,v 1.12 2005/08/26 17:36:32 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*/
@@ -93,6 +93,8 @@ static void setfield (lua_State *L, const char *key, int value) {
93} 93}
94 94
95static void setboolfield (lua_State *L, const char *key, int value) { 95static void setboolfield (lua_State *L, const char *key, int value) {
96 if (value < 0) /* undefined? */
97 return; /* does not set field */
96 lua_pushboolean(L, value); 98 lua_pushboolean(L, value);
97 lua_setfield(L, -2, key); 99 lua_setfield(L, -2, key);
98} 100}