poafloc

poafloc - Parser Of Arguments For Lines Of Commands
git clone git://git.dimitrijedobrota.com/poafloc.git
Log | Files | Refs | README | LICENSE

commit f741ddbbbb8a9423345073b3a613f45cf14e55c7
parent 981fee6457fd20e5a19e46f7f57af92f993fafc5
Author: Dimitrije Dobrota <mail@dimitrijedobrota.com>
Date:   Wed, 12 Jun 2024 20:30:01 +0200

Fix optional argument for short option

Diffstat:
Msrc/args.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

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;