poaflocParser Of Arguments For Lines Of Commands |
git clone git://git.dimitrijedobrota.com/poafloc.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING | |
commit | f741ddbbbb8a9423345073b3a613f45cf14e55c7 |
parent | 981fee6457fd20e5a19e46f7f57af92f993fafc5 |
author | Dimitrije Dobrota <mail@dimitrijedobrota.com> |
date | Wed, 12 Jun 2024 18:30:01 +0200 |
Fix optional argument for short option
Diffstat:M | src/args.cpp | | | +- |
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/args.cpp b/src/args.cpp
@@ -160,7 +160,7 @@ int Parser::parse(int argc, char *argv[]) {
if (opt[j + 1] != 0) {
argp->parse(key, opt + j + 1, this);
break;
} else if (!is_opt) argp->parse(key, nullptr, this);
} else if (is_opt) argp->parse(key, nullptr, this);
else if (i + 1 != argc) {
argp->parse(key, argv[++i], this);
break;