diff options
Diffstat (limited to 'dimension')
-rw-r--r-- | dimension/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dimension/main.c b/dimension/main.c index ee2e680..6e40c08 100644 --- a/dimension/main.c +++ b/dimension/main.c @@ -82,7 +82,12 @@ main(int argc, char **argv) case '?': print_usage(stdout, argv[0]); - return EXIT_SUCCESS; + /* '?' is returned as an error code too */ + if (optopt == 0) { + return EXIT_SUCCESS; + } else { + return EXIT_FAILURE; + } case DMNSN_OPT_VERSION: print_version(stdout); return EXIT_SUCCESS; |