From: Magnus Jacobsson Date: Sun, 6 Sep 2020 14:45:58 +0000 (+0200) Subject: Fix gvedit -? to actually print usage instead of error X-Git-Tag: 2.46.0~20^2^2~88^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11e22d42b3606303771b89b417069a7e568aa1d7;p=graphviz Fix gvedit -? to actually print usage instead of error Fixes https://gitlab.com/graphviz/graphviz/-/issues/1813 --- 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) <<