diff options
author | 2023-10-22 10:38:48 -0400 | |
---|---|---|
committer | 2023-10-22 10:38:48 -0400 | |
commit | e5c4907791f354da8ebe39100c7dbef7dc349708 (patch) | |
tree | 2df89e3ca1d5e611554a80e511c59ed3c2d4e927 /src/emu/softlist_dev.cpp | |
parent | 087233e15b48c664427c44792f9b97c07892f2eb (diff) |
Disallow zero-length regions in ROM definitions and software lists
Diffstat (limited to 'src/emu/softlist_dev.cpp')
-rw-r--r-- | src/emu/softlist_dev.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/emu/softlist_dev.cpp b/src/emu/softlist_dev.cpp index 595e0bb9a73..b65f5f28300 100644 --- a/src/emu/softlist_dev.cpp +++ b/src/emu/softlist_dev.cpp @@ -576,6 +576,8 @@ void software_list_device::internal_validity_check(validity_checker &valid) current_length = ROMREGION_GETLENGTH(romp); if (!data_area_map.emplace(romp->name(), current_length).second) osd_printf_error("%s: %s part %s data area has duplicate name '%s'\n", m_filename, shortname, part.name(), romp->name()); + if (current_length == 0) + osd_printf_error("%s: %s part %s data area '%s' has zero length\n", m_filename, shortname, part.name(), romp->name()); } else if (ROMENTRY_ISFILE(romp)) // if this is a file, make sure it is properly formatted { |