mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
(MESS) corvushd: fix crash in Apple II Corvus diagnostics (nw)
This commit is contained in:
parent
5b7e720a1b
commit
ff210e330b
@ -872,6 +872,13 @@ hard_disk_file *corvus_hdc_t::corvus_hdc_file(int id) {
|
||||
static const char *const tags[] = {
|
||||
"harddisk1", "harddisk2", "harddisk3", "harddisk4"
|
||||
};
|
||||
|
||||
// we only support 4 drives, as per the tags[] table, so prevent a crash
|
||||
if (id > 3)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
harddisk_image_device *img = siblingdevice<harddisk_image_device>(tags[id]);
|
||||
|
||||
if ( !img )
|
||||
|
Loading…
Reference in New Issue
Block a user