|
@@ -92,8 +92,9 @@ bool CommandLine::Parse(int argc,const char **argv)
|
|
|
// Match up to a = against the list
|
|
// Match up to a = against the list
|
|
|
Args *A;
|
|
Args *A;
|
|
|
const char *OptEnd = strchrnul(Opt, '=');
|
|
const char *OptEnd = strchrnul(Opt, '=');
|
|
|
- for (A = ArgList; A->end() == false &&
|
|
|
|
|
- stringcasecmp(Opt,OptEnd,A->LongOpt) != 0; A++);
|
|
|
|
|
|
|
+ for (A = ArgList; A->end() == false &&
|
|
|
|
|
+ (A->LongOpt == 0 || stringcasecmp(Opt,OptEnd,A->LongOpt) != 0);
|
|
|
|
|
+ ++A);
|
|
|
|
|
|
|
|
// Failed, look for a word after the first - (no-foo)
|
|
// Failed, look for a word after the first - (no-foo)
|
|
|
bool PreceedMatch = false;
|
|
bool PreceedMatch = false;
|