From 421c1fa2c01fe9255b47dd414a22099f9f082377 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 3 Oct 2020 16:17:01 +0200 Subject: [PATCH] Explicitly specify -? as an option in lib/spine/spine.c --- lib/spine/spine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spine/spine.c b/lib/spine/spine.c index 791dc4580..4bdab515b 100644 --- a/lib/spine/spine.c +++ b/lib/spine/spine.c @@ -610,7 +610,7 @@ static void doOpts(int argc, char *argv[], opts_t * op) op->sparse_ratio = 0.5; opterr = 0; - while ((c = getopt(argc, argv, "o:r:v::")) != -1) { + while ((c = getopt(argc, argv, "o:r:v::?")) != -1) { switch (c) { case 'o': op->outfp = openFile(cmd, optarg, "w"); @@ -632,7 +632,7 @@ static void doOpts(int argc, char *argv[], opts_t * op) } break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(cmd, 0); else { fprintf(stderr, "%s: option -%c unrecognized\n", -- 2.40.0