mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6368 from Icinga/fix/program-options-parsing-6365
Fix program option parsing
This commit is contained in:
commit
eb1f37905d
|
@ -186,7 +186,7 @@ bool CLICommand::ParseCommand(int argc, char **argv, po::options_description& vi
|
|||
std::vector<String>::size_type i;
|
||||
int k;
|
||||
for (i = 0, k = 1; i < vname.size() && k < argc; i++, k++) {
|
||||
if (strncmp(argv[k], "--", 2) == 0) {
|
||||
if (strncmp(argv[k], "-", 1) == 0 || strncmp(argv[k], "--", 2) == 0) {
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue