cmdopt2: actually advance positional parsing cursor
This commit is contained in:
parent
bc5aaae818
commit
40f2f3b99f
@ -203,7 +203,8 @@ parser::parse (int const argc, const char *const *argv)
|
||||
found_positional[pos_cursor] = true;
|
||||
auto &pos_arg = m_positional[pos_cursor];
|
||||
if (pos_arg.acceptor1)
|
||||
(*pos_arg.acceptor1) (argv[arg_cursor++]);
|
||||
(*pos_arg.acceptor1) (argv[arg_cursor]);
|
||||
arg_cursor++;
|
||||
}
|
||||
|
||||
for (int i = 0, last = std::ssize (m_positional); i < last; ++i)
|
||||
|
Loading…
Reference in New Issue
Block a user