]> granicus.if.org Git - graphviz/commitdiff
fix: teach mingle '-?' on macOS and Windows
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 11 Mar 2022 03:59:09 +0000 (19:59 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Mar 2022 20:28:16 +0000 (13:28 -0700)
This is the equivalent of b4925c87f1e28a1bc66d111ef046e4e083db8c5b and friends,
but for mingle. It was not previously detected that this problem also affects
mingle because it is not currently built on macOS or Windows in CI. This will be
improved in future.

Gitlab: #1852

cmd/mingle/minglemain.cpp

index fcdf8f6525d31d6721b49d683bc39c8ca6028528..345a6c731739319413fd2f686e1a1913b7404a00 100644 (file)
@@ -207,7 +207,7 @@ static void init(int argc, char *argv[], opts_t* opts)
                        }
                        break;
                case '?':
-                       if (optopt == '\0')
+                       if (optopt == '\0' || optopt == '?')
                                usage(0);
                        else {
                                std::cerr << cmd << ": option -" << optopt << " unrecognized\n";