From f57851587dcf766843b2e9dc25ad2cb9c1e0ed6e Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Fri, 23 Oct 2020 13:16:51 +0100 Subject: [PATCH] Fix edge case where FallbackMap has no comma --- components/fallback/validate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/fallback/validate.cpp b/components/fallback/validate.cpp index 27f1f233e5..98c6c39fd5 100644 --- a/components/fallback/validate.cpp +++ b/components/fallback/validate.cpp @@ -13,7 +13,7 @@ void Fallback::validate(boost::any& v, std::vector const& tokens, F { std::string temp = Files::EscapeHashString::processString(token); size_t sep = temp.find(","); - if (sep < 1 || sep == temp.length() - 1) + if (sep < 1 || sep == temp.length() - 1 || sep == std::string::npos) #if (BOOST_VERSION < 104200) throw boost::program_options::validation_error("invalid value"); #else