diff options
Diffstat (limited to 'src/lib/util/options.cpp')
-rw-r--r-- | src/lib/util/options.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp index 3c30c6dfd97..af83291f83b 100644 --- a/src/lib/util/options.cpp +++ b/src/lib/util/options.cpp @@ -361,13 +361,18 @@ bool core_options::parse_command_line(std::vector<std::string> &args, int priori { // we need to relocate this option if (new_argc != arg) - args[new_argc++] = std::move(args[arg]); + args[new_argc] = std::move(args[arg]); + new_argc++; if (!is_unadorned) { arg++; - if (new_argc != arg && arg < args.size()) - args[new_argc++] = std::move(args[arg]); + if (arg < args.size()) + { + if (new_argc != arg) + args[new_argc] = std::move(args[arg]); + new_argc++; + } } continue; } |