From 5c77829b1f113e329fd539c220015319360139f9 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 3 Oct 2020 16:06:06 +0200 Subject: [PATCH] Show usage and exit non-zero for unsupported option in lib/spine/spine.c Final commit that fixes https://gitlab.com/graphviz/graphviz/-/issues/1843. --- lib/spine/spine.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spine/spine.c b/lib/spine/spine.c index c1b023fb4..791dc4580 100644 --- a/lib/spine/spine.c +++ b/lib/spine/spine.c @@ -634,9 +634,11 @@ static void doOpts(int argc, char *argv[], opts_t * op) case '?': if (optopt == '?') usage(cmd, 0); - else - fprintf(stderr, "%s: option -%c unrecognized - ignored\n", + else { + fprintf(stderr, "%s: option -%c unrecognized\n", cmd, optopt); + usage(cmd, 1); + } break; default: break; -- 2.40.0