From 996be967570279a7bf701bee87058947caf532ee Mon Sep 17 00:00:00 2001 From: Allanis Date: Wed, 5 Mar 2014 21:57:51 +0000 Subject: [PATCH] [Add] Allow Lua booleans in conf booleans. --- src/conf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/conf.c b/src/conf.c index e8ce061..2b4cf07 100644 --- a/src/conf.c +++ b/src/conf.c @@ -31,10 +31,12 @@ #define conf_loadBool(n,b) \ lua_getglobal(L,n); \ - if(lua_isnumber(L, -1)) \ - if((int)lua_tonumber(L, -1) == 1) { \ - b = 1; \ + if(lua_isnumber(L, -1)) { \ + if((int)lua_tonumber(L, -1) == 1) \ + b = 1; \ } \ + else if(lua_isboolean(L, -1)) \ + b = lua_toboolean(L, -1); \ lua_remove(L, -1); \ #define conf_loadString(n,s) \