mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
Fixed issue that could cause bogus arguments to be reported incorrectly
Examples: 'mame -whatever nes' would previously be reported as "Unrecognized argument: nes"
This commit is contained in:
parent
e4741f5ac1
commit
44c04cd97a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user