From 11e22d42b3606303771b89b417069a7e568aa1d7 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sun, 6 Sep 2020 16:45:58 +0200 Subject: [PATCH] Fix gvedit -? to actually print usage instead of error Fixes https://gitlab.com/graphviz/graphviz/-/issues/1813 --- cmd/gvedit/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gvedit/main.cpp b/cmd/gvedit/main.cpp index bb4c2546b..76a0ed643 100644 --- a/cmd/gvedit/main.cpp +++ b/cmd/gvedit/main.cpp @@ -66,7 +66,7 @@ static char **parseArgs(int argc, char *argv[]) Verbose = 1; break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else errout << cmd << " : option -" << ((char) optopt) << -- 2.40.0