diff --git a/include/ss/extract.hpp b/include/ss/extract.hpp index 8c40154..3230777 100644 --- a/include/ss/extract.hpp +++ b/include/ss/extract.hpp @@ -343,19 +343,21 @@ inline bool extract(const char* begin, const char* end, bool& value) { value = true; } else if (*begin == '0') { value = false; + } else { + return false; } - return true; } else { size_t size = end - begin; if (size == 4 && strncmp(begin, "true", size) == 0) { value = true; } else if (size == 5 && strncmp(begin, "false", size) == 0) { value = false; + } else { + return false; } - return true; } - return false; + return true; } template <>