fix: Fix custom option parsing in case of CXXOPTS_NO_REGEX

This commit is contained in:
Nitin Kumar 2026-01-22 18:08:37 +05:30
parent c647dd4cc1
commit 9704c3acd7
1 changed files with 9 additions and 1 deletions

View File

@ -758,8 +758,16 @@ inline ArguDesc ParseArgument(const char *arg, bool &matched)
{
pdata += 1;
if(isalnum(*pdata, std::locale::classic())) {
// If we have '=' right after first alnum, its a match.
if(*(pdata+1) == '=') {
argu_desc.arg_name.push_back(*pdata);
argu_desc.set_value = true;
argu_desc.value = std::string(pdata+2);
}
else{
argu_desc.arg_name = std::string(pdata);
}
argu_desc.grouping = true;
argu_desc.arg_name = std::string(pdata);
matched = true;
}
}