]> git.draconx.ca Git - dxcommon.git/commit
help_print_optstring: Fix handling of 'flag' options.
authorNick Bowler <nbowler@draconx.ca>
Thu, 24 Feb 2022 01:47:55 +0000 (20:47 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 24 Feb 2022 01:47:55 +0000 (20:47 -0500)
commit03a26752c80546ac8cf8fc81807bb5a153786599
tree27351ca0a89b39ce3efa20578a2010db98be113f
parent5d7b80ce6f21d6d90ecec188f135e665d789dede
help_print_optstring: Fix handling of 'flag' options.

When getopt_long options use the 'flag' feature, the 'val' member is
not meaningful as a short option.  So we shouldn't try to format it
as if there is a short option, as this leads to printing garbage.
src/help.c
t/helpopt.c
tests/functions.at