mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
Fix program option parsing
This fixes the program option parsing.
This commit is contained in:
parent
eee30750d5
commit
e885cf71c6
@ -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