Skip to content

Commit

Permalink
Move check whether all args were parsed out of getopt while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
pzembrod committed Dec 17, 2023
1 parent 0abca29 commit b5ae602
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RunCPM/abstraction_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,10 @@ static void _parse_options(int argc, char *argv[]) {
"Unrecognized option: '-%c'\n", optopt);
errflg++;
}
if (errflg || optind != argc) {
_usage(argv);
exit(EXIT_FAILURE);
}
}
if (errflg || optind != argc) {
_usage(argv);
exit(EXIT_FAILURE);
}
}
#endif
Expand Down

0 comments on commit b5ae602

Please sign in to comment.