aboutsummaryrefslogtreecommitdiff
path: root/loslib.c
diff options
context:
space:
mode:
Diffstat (limited to 'loslib.c')
-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}