From 1fe4b36065df2c3e3d1bcc342a60dbe888e5a39a Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 21 May 2018 03:01:39 -0400 Subject: [PATCH] Fix error in debug build with SMS card options (nw) --- src/emu/emuopts.cpp | 7 +++++-- src/lib/util/options.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 7c5deccbdac..1cb0fbadc3d 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -383,14 +383,17 @@ namespace std::vector get_full_option_names(const device_image_interface &image) { std::vector result; + bool same_name = image.instance_name() == image.brief_instance_name(); result.push_back(image.instance_name()); - result.push_back(image.brief_instance_name()); + if (!same_name) + result.push_back(image.brief_instance_name()); if (strcmp(image.device_typename(image.image_type()), image.instance_name().c_str()) == 0) { result.push_back(image.instance_name() + "1"); - result.push_back(image.brief_instance_name() + "1"); + if (!same_name) + result.push_back(image.brief_instance_name() + "1"); } return result; } diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp index 14c96f680e8..d323ef11ffe 100644 --- a/src/lib/util/options.cpp +++ b/src/lib/util/options.cpp @@ -431,7 +431,7 @@ void core_options::add_entry(entry::shared_ptr &&entry, const char *after_header void core_options::add_to_entry_map(std::string &&name, entry::shared_ptr &entry) { - // it is illegal to call this method for something that already ex0ists + // it is illegal to call this method for something that already exists assert(m_entrymap.find(name) == m_entrymap.end()); // append the entry