summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/romload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/romload.cpp')
-rw-r--r--src/emu/romload.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp
index ff680b173a1..4945de6a197 100644
--- a/src/emu/romload.cpp
+++ b/src/emu/romload.cpp
@@ -1173,6 +1173,10 @@ chd_error rom_load_manager::open_disk_diff(emu_options &options, const rom_entry
void rom_load_manager::process_disk_entries(const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, const char *locationtag)
{
+ /* remove existing disk entries for this region */
+ m_chd_list.erase(std::remove_if(m_chd_list.begin(), m_chd_list.end(),
+ [regiontag](std::unique_ptr<open_chd> &chd){ return !strcmp(chd->region(), regiontag); }), m_chd_list.end());
+
/* loop until we hit the end of this region */
for ( ; !ROMENTRY_ISREGIONEND(romp); romp++)
{