Properly handle argumenets with no assigned value (e.g. --hla)
This commit is contained in:
parent
c24e0fb5b8
commit
563737bed1
1 changed files with 2 additions and 2 deletions
|
@ -43,8 +43,8 @@ ArgumentParser::ArgumentParser(int argc, char **argv) :
|
|||
val = arg.substr(pos+1);
|
||||
arg = arg.substr(0, pos);
|
||||
}
|
||||
else if (++i<argc) {
|
||||
val = argv[i];
|
||||
else if ((i+1)<argc && argv[i+1][0] != '-') {
|
||||
val = argv[++i];
|
||||
} else {
|
||||
val = "";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue