Simulator: fix argument parsing.

When getopt_long sets *flag to val, it returns 0.  Previously this
was considered an error. See getopt(3).
This commit is contained in:
Justus Winter 2018-05-17 16:10:42 +02:00 committed by Markus Hitter
parent 6f46e95b77
commit 7760ef3a34
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ void sim_start(int argc, char** argv) {
while ((c = getopt_long (argc, argv, shortopts, opts, &index)) != -1)
switch (c) {
case 0:
// Long option without short counterpart.
break;
case 'q':
verbose = 0;
break;