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:
parent
6f46e95b77
commit
7760ef3a34
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue