diff th_args.c @ 750:56594b498180

Adjust short option cosmetics in help.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 30 Dec 2022 09:12:47 +0200
parents 31bc1ed07cf5
children
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);