aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liolib.c b/liolib.c
index 11ddf8f4..916e5575 100644
--- a/liolib.c
+++ b/liolib.c
@@ -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) {
569static int getboolfield (lua_State *L, const char *key) { 569static 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}