From 68349cc8238902a288417df024d89c4947d18cb5 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sun, 4 Oct 2020 20:53:14 +0200 Subject: [PATCH] Explicitly specify -? as an option in gvmap --- cmd/gvmap/gvmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gvmap/gvmap.c b/cmd/gvmap/gvmap.c index 9a64c779b..5fa4c934e 100644 --- a/cmd/gvmap/gvmap.c +++ b/cmd/gvmap/gvmap.c @@ -254,7 +254,7 @@ init(int argc, char **argv, params_t* pm) pm->bbox_margin[0] = pm->bbox_margin[1] = 0; opterr = 0; - while ((c = getopt(argc, argv, ":evODQko:m:s:r:p:c:C:l:b:g:t:a:h:z:d:")) != -1) { + while ((c = getopt(argc, argv, ":evODQko:m:s:r:p:c:C:l:b:g:t:a:h:z:d:?")) != -1) { switch (c) { case 'm': if ((sscanf(optarg,"%lf",&s) > 0) && (s != 0)){ @@ -389,7 +389,7 @@ init(int argc, char **argv, params_t* pm) fprintf(stderr, "gvpack: option -%c missing argument - ignored\n", optopt); break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(cmd, 0); else { fprintf(stderr, " option -%c unrecognized\n", optopt); -- 2.40.0