Fixed bool value badly parsed, fixes #542
This commit is contained in:
@@ -149,9 +149,9 @@ namespace lms::core::stringUtils
|
|||||||
template<>
|
template<>
|
||||||
std::optional<bool> readAs(std::string_view str)
|
std::optional<bool> readAs(std::string_view str)
|
||||||
{
|
{
|
||||||
if (str == "1" || str == "true")
|
if (str == "1" || stringCaseInsensitiveEqual(str, "true"))
|
||||||
return true;
|
return true;
|
||||||
else if (str == "0" || str == "false")
|
else if (str == "0" || stringCaseInsensitiveEqual(str, "false"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|||||||
Reference in New Issue
Block a user