From: Rusty Russell Date: Wed, 9 May 2018 03:09:47 +0000 (+0930) Subject: opt: print usage correctly for early args. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=f63b868e37309f0909507fc1b6ffe5b415299199;ds=sidebyside opt: print usage correctly for early args. Signed-off-by: Rusty Russell --- diff --git a/ccan/opt/usage.c b/ccan/opt/usage.c index 353d59bc..12f44a48 100644 --- a/ccan/opt/usage.c +++ b/ccan/opt/usage.c @@ -110,7 +110,7 @@ static char *add_desc(char *base, size_t *len, size_t *max, base = add_str(base, len, max, opt->names); off = strlen(opt->names); - if (opt->type == OPT_HASARG + if ((opt->type & OPT_HASARG) && !strchr(opt->names, ' ') && !strchr(opt->names, '=')) { base = add_str(base, len, max, " ");