From 6099398a3cca0d2e1018cf342a76a046b79f8165 Mon Sep 17 00:00:00 2001 From: Masashi Fujita Date: Mon, 4 Dec 2017 09:04:00 +0900 Subject: [PATCH] fix: Fix `false` pattern too cf. 318055b811e1578027431a31ecaadd7c8fb6177f --- include/cxxopts.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 5068e67..184de72 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -446,7 +446,7 @@ namespace cxxopts std::basic_regex truthy_pattern ("(t|T)(rue)?"); std::basic_regex falsy_pattern - ("(f|false|F|False)?"); + ("((f|F)(alse)?)?"); } namespace detail @@ -1570,7 +1570,7 @@ ParseResult::consume_positional(std::string a) if (iter != m_options.end()) { auto& result = m_results[iter->second]; - if (!iter->second->value().is_container()) + if (!iter->second->value().is_container()) { if (result.count() == 0) {