]> granicus.if.org Git - graphviz/commitdiff
Fix gvedit -? to actually print usage instead of error
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 6 Sep 2020 14:45:58 +0000 (16:45 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 11 Sep 2020 05:37:29 +0000 (07:37 +0200)
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1813

cmd/gvedit/main.cpp

index bb4c2546b58d7e0cfac39066c5c648dd31f7772e..76a0ed6434020a19c34183c7d0116136443b4ee9 100644 (file)
@@ -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) <<