aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-05-13 03:10:30 -0400
committerB. Watson <yalhcru@gmail.com>2020-05-13 03:10:30 -0400
commit2fb259512f92fbc533612693b639ea8bafe7ba29 (patch)
tree16b8b036568eb9161bc0556922f445d63182a22b
parent649c55da8e93073d74dc262488aa42f55138b11f (diff)
downloadmiragextract-2fb259512f92fbc533612693b639ea8bafe7ba29.tar.gz
error out on multi-char options instead of silently ignoring 2nd and further chars
-rw-r--r--miragextract.c5
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':