]> git.draconx.ca Git - dxcommon.git/commit
help_print_desc: Ensure newline is printed for empty description.
authorNick Bowler <nbowler@draconx.ca>
Thu, 13 Apr 2023 01:11:38 +0000 (21:11 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 13 Apr 2023 01:11:38 +0000 (21:11 -0400)
commit54f9ce81ef444d6e869f7b32066928ed82c17dff
tree0b6cb3cb3165c4ef329bb61e3e7e1bbb1f2b4de5
parent43e5c4ebc6411fcc47a637ddeb22ac02bb5561ee
help_print_desc: Ensure newline is printed for empty description.

Callers expect help_print_desc to always end on a new line, so that the
next option can be printed at the start of a new line.  Currently,
however, this function does nothing for an empty description string,
leading to incorrect output unless the option name was long enough
that help_print_optstring took care of it.

Add a special case to fix that up, and a new test case.
src/help.c
tests/functions.at