diff --git a/code/espurna/settings.cpp b/code/espurna/settings.cpp index 08eee12d..e56fd7d2 100644 --- a/code/espurna/settings.cpp +++ b/code/espurna/settings.cpp @@ -87,7 +87,23 @@ long convert(const String& value) { template <> bool convert(const String& value) { - return convert(value) == 1; + if (value.length()) { + if ((value == "0") + || (value == "n") + || (value == "no") + || (value == "false") + || (value == "off")) { + return false; + } + + return (value == "1") + || (value == "y") + || (value == "yes") + || (value == "true") + || (value == "on"); + } + + return false; } template <>