summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cam/options.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cam/options.cpp b/src/cam/options.cpp
index 6e0d802c..33bc512e 100644
--- a/src/cam/options.cpp
+++ b/src/cam/options.cpp
@@ -945,6 +945,13 @@ OptionsParser::Options OptionsParser::parse(int argc, char **argv)
}
}
+ if (optind < argc) {
+ std::cerr << "Invalid non-option argument '" << argv[optind]
+ << "'" << std::endl;
+ usage();
+ return options;
+ }
+
options.valid_ = true;
return options;
}