summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util/options.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c
index ed1a62a6f6c..88c173c1c65 100644
--- a/src/lib/util/options.c
+++ b/src/lib/util/options.c
@@ -346,6 +346,7 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, astri
// iterate through arguments
int unadorned_index = 0;
+ bool retVal = true;
for (int arg = 1; arg < argc; arg++)
{
// determine the entry name to search for
@@ -358,7 +359,9 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, astri
if (curentry == NULL)
{
error_string.catprintf("Error: unknown option: %s\n", curarg);
- return false;
+ retVal = false;
+ if (!is_unadorned) arg++;
+ continue;
}
// process commands first
@@ -391,7 +394,7 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, astri
// set the new data
validate_and_set_data(*curentry, newdata, priority, error_string);
}
- return true;
+ return retVal;
}