From b07b7a86c4cc43fe9c36cbfdc87ae284c3c01f41 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Thu, 5 Dec 2024 21:07:32 +0000 Subject: [PATCH] cmd: fix arglist count not including multiple occurrences of the same non-arg options --- cmd/arglist.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/arglist.c b/cmd/arglist.c index 3b3f617..bf7b598 100644 --- a/cmd/arglist.c +++ b/cmd/arglist.c @@ -921,6 +921,10 @@ bool b_arglist_iterator_next(struct b_arglist_iterator *it) } b_btree_iterator_begin(&opt->opt_values, &it->_arg_it); + + if (it->_arg_filter == B_COMMAND_INVALID_ID) { + return true; + } } }