Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/CLI/impl/App_inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1974,7 +1974,8 @@ App::_parse_arg(std::vector<std::string> &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);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/FuzzFailTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
Binary file added tests/fuzzFail/parse_fail_check3
Binary file not shown.
Loading