From 36449658420b371c48961b8d96177cc302098c35 Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Tue, 17 Nov 2020 20:56:02 +0100 Subject: [PATCH] Fix bool settings being improperly loaded as strings --- settings.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/settings.lua b/settings.lua index 75b1f51..e3fa673 100644 --- a/settings.lua +++ b/settings.lua @@ -22,8 +22,11 @@ local function get_settings(key, dtype, default) elseif dtype == "float" then conf_val = tonumber(conf_val) storage:set_float(key, conf_val) - elseif dtype == "string" or dtype == "bool" then + else storage:set_string(key, conf_val) + if dtype == "bool" then + conf_val = conf_val == 'true' + end end return conf_val