mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
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;
|
std::vector<String>::size_type i;
|
||||||
int k;
|
int k;
|
||||||
for (i = 0, k = 1; i < vname.size() && k < argc; i++, 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--;
|
i--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user