From 788e2ee3c30d5dff08dca7467f7e80cfd3156673 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 5 Jan 2026 17:06:30 -0600 Subject: [PATCH] roken: Fix getarg run-on help bug --- lib/roken/getarg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/roken/getarg.c b/lib/roken/getarg.c index 76f3c808a..c38accaa9 100644 --- a/lib/roken/getarg.c +++ b/lib/roken/getarg.c @@ -290,6 +290,9 @@ arg_printusage_i18n (struct getargs *args, strlcat(buf, "...", sizeof(buf)); col = check_column(stderr, col, strlen(buf) + 1, columns); col += fprintf(stderr, " %s", buf); + } else if (args[i].short_name) { + /* Flags: count the "-X" even though we don't print it in synopsis */ + len += 2; } if (args[i].long_name && args[i].short_name) len += 2; /* ", " */