Fix bool settings being improperly loaded as strings

This commit is contained in:
Gael-de-Sailly 2020-11-17 20:56:02 +01:00
parent 9725979363
commit 3644965842
1 changed files with 4 additions and 1 deletions

View File

@ -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