aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 25919d1..0c8a813 100644
--- a/src/config.c
+++ b/src/config.c
@@ -6,6 +6,7 @@ int _print_type = 0;
int _max_depth = 2;
int _start_nl_at = 3;
int _collapse_all = 0;
+int _collapse_to_memory = 1;
int _file_malloc_chunk = 512;
@@ -24,7 +25,13 @@ int l_set(lua_State* L) {
int ind = get_config_map(lua_tostring(L,-2));
if(ind != -1) {
- *config_map[ind].value = lua_tonumber(L,-1);
+ int key;
+ if(lua_isboolean(L, -1)){
+ key = lua_toboolean(L, -1);
+ } else {
+ key = lua_tonumber(L, -1);
+ }
+ *config_map[ind].value = key;
lua_pushnumber(L, 1);
return 1;
}