Fixed bool value badly parsed, fixes #542

This commit is contained in:
emeric
2024-10-30 18:55:45 +01:00
parent 33f4cf47ea
commit e46682e346
+2 -2
View File
@@ -149,9 +149,9 @@ namespace lms::core::stringUtils
template<>
std::optional<bool> readAs(std::string_view str)
{
if (str == "1" || str == "true")
if (str == "1" || stringCaseInsensitiveEqual(str, "true"))
return true;
else if (str == "0" || str == "false")
else if (str == "0" || stringCaseInsensitiveEqual(str, "false"))
return false;
return std::nullopt;