diff options
author | B. Watson <yalhcru@gmail.com> | 2020-05-13 03:10:30 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2020-05-13 03:10:30 -0400 |
commit | 2fb259512f92fbc533612693b639ea8bafe7ba29 (patch) | |
tree | 16b8b036568eb9161bc0556922f445d63182a22b | |
parent | 649c55da8e93073d74dc262488aa42f55138b11f (diff) | |
download | miragextract-2fb259512f92fbc533612693b639ea8bafe7ba29.tar.gz |
error out on multi-char options instead of silently ignoring 2nd and further chars
-rw-r--r-- | miragextract.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/miragextract.c b/miragextract.c index a28797d..6884ef7 100644 --- a/miragextract.c +++ b/miragextract.c @@ -377,6 +377,11 @@ void parse_args(int argc, char **argv) { while(++argv, --argc) { if(argv[0][0] == '-') { + /* avoid confusion, I hope */ + if(argv[0][1] && argv[0][2]) { + fprintf(stderr, "%s: invalid option '%s', bundling not supported\n", self, argv[0]); + exit(1); + } char *nextarg = argv[1]; switch(argv[0][1]) { case 'L': |