diff options
author | Nathan Woods <npwoods@mess.org> | 2017-02-26 09:08:20 -0500 |
---|---|---|
committer | Vas Crabb <cuavas@users.noreply.github.com> | 2017-02-27 01:14:11 +1100 |
commit | 239dcd44490c467c31c7d0c51da5fefdfec8d9f6 (patch) | |
tree | 3510ce185b24ab2d0aaec66f2e623c6c8a217113 /src/frontend | |
parent | 4b9648e7cd7cae926c4b088b8a5840cd1364ec1c (diff) |
Fixed regression pertaining to specification of empty strings as slot names
e.g. - 'next -scsibus:1 "" -listdevices'
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/mame/mameopts.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/frontend/mame/mameopts.cpp b/src/frontend/mame/mameopts.cpp index e3aed3d751e..10f8a50ce3a 100644 --- a/src/frontend/mame/mameopts.cpp +++ b/src/frontend/mame/mameopts.cpp @@ -220,18 +220,22 @@ bool mame_options::parse_command_line(emu_options &options, std::vector<std::str auto value_specifier = [&softlist_opts, &args, &error_string](emu_options &options, const std::string &arg) { // first find within the command line - std::string arg_value = options.pluck_from_command_line(args, arg); + std::string arg_value; + bool success = options.pluck_from_command_line(args, arg, arg_value); // next try to find within softlist-specified options - if (arg_value.empty()) + if (!success) { auto iter = softlist_opts.find(arg); if (iter != softlist_opts.end()) + { arg_value = iter->second; + success = true; + } } // did we find something? - if (!arg_value.empty()) + if (success) options.set_value(arg.c_str(), arg_value.c_str(), OPTION_PRIORITY_MAXIMUM, error_string); }; |