From 94ea7fb36723c7c130d5ffa06510ddecb85c8665 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sun, 4 Oct 2020 20:55:09 +0200 Subject: [PATCH] Explicitly specify -? as an option in mingle --- cmd/mingle/minglemain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/mingle/minglemain.c b/cmd/mingle/minglemain.c index c2403dd21..4683c0bb2 100644 --- a/cmd/mingle/minglemain.c +++ b/cmd/mingle/minglemain.c @@ -128,7 +128,7 @@ static void init(int argc, char *argv[], opts_t* opts) opts->angle_param = -1; opts->angle = 40.0/180.0*M_PI; - while ((c = getopt(argc, argv, ":a:c:i:k:K:m:o:p:r:T:v:")) != -1) { + while ((c = getopt(argc, argv, ":a:c:i:k:K:m:o:p:r:T:v:?")) != -1) { switch (c) { case 'a': if ((sscanf(optarg,"%lf",&s) > 0) && (s >= 0)) @@ -205,7 +205,7 @@ static void init(int argc, char *argv[], opts_t* opts) } break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else { fprintf(stderr, "%s: option -%c unrecognized\n", cmd, optopt); -- 2.40.0