changeset 750:56594b498180

Adjust short option cosmetics in help.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 30 Dec 2022 09:12:47 +0200
parents feadd3678d2e
children 3091fd1987e9
files th_args.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/th_args.c	Wed Dec 21 17:23:10 2022 +0200
+++ b/th_args.c	Fri Dec 30 09:12:47 2022 +0200
@@ -271,8 +271,9 @@
         }
         else
         {
-            snprintf(fmtBuf, sizeof(fmtBuf), " -%c,",
-                opt->o_short);
+            snprintf(fmtBuf, sizeof(fmtBuf), " -%c%s",
+                opt->o_short,
+                hasLongOpt ? "," : "");
         }
 
         *optWidth = strlen(fmtBuf);