diff options
Diffstat (limited to '')
-rw-r--r-- | src/argparser.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/argparser.c b/src/argparser.c index e0f53bf..1ec75f9 100644 --- a/src/argparser.c +++ b/src/argparser.c @@ -1408,11 +1408,12 @@ long args_parse(int argc, char** argv) { char* opt = args_optmap_get_standard(*(optqueue + i)); char* arg = argptr > i ? *(argqueue + i) : null; + if (argptr <= i) + args_optmap_trigger(opt, null); i++; if ((args_optmap_contains(opt) == false) || (args_opts_contains(opt) == false)) args_opts_new(opt); - if (argptr >= i) - args_opts_append(opt, arg); + args_opts_append(opt, arg); ((args_Array*)map_get(&args_opts, opt))->used = true; } } |