diff --git a/include/CLI/impl/App_inl.hpp b/include/CLI/impl/App_inl.hpp index 2e17cb89..fdeab4e0 100644 --- a/include/CLI/impl/App_inl.hpp +++ b/include/CLI/impl/App_inl.hpp @@ -1974,7 +1974,8 @@ App::_parse_arg(std::vector &args, detail::Classifier current_type, } std::string dummy1, dummy2; bool val = false; - if(current_type == detail::Classifier::SHORT || detail::split_long(args.back(), dummy1, dummy2)) { + if((current_type == detail::Classifier::SHORT && detail::valid_first_char(args.back()[1])) || + detail::split_long(args.back(), dummy1, dummy2)) { val = sub->_parse_arg(args, current_type, true); } diff --git a/tests/FuzzFailTest.cpp b/tests/FuzzFailTest.cpp index 683214a9..09ed65d9 100644 --- a/tests/FuzzFailTest.cpp +++ b/tests/FuzzFailTest.cpp @@ -341,7 +341,7 @@ TEST_CASE("app_roundtrip_parse_normal_fail") { // like HorribleErrors CLI::FuzzApp fuzzdata; auto app = fuzzdata.generateApp(); - int index = GENERATE(range(1, 3)); + int index = GENERATE(range(1, 4)); std::string optionString, flagString; auto parseData = loadFailureFile("parse_fail_check", index); std::size_t pstring_start{0}; diff --git a/tests/fuzzFail/parse_fail_check3 b/tests/fuzzFail/parse_fail_check3 new file mode 100644 index 00000000..9640122e Binary files /dev/null and b/tests/fuzzFail/parse_fail_check3 differ