cdrom_set_signature() now does a sanity check on the CD-ROM drive ID, fixes random crashes on hard reset.

This commit is contained in:
OBattler
2017-02-13 20:21:57 +01:00
parent 8747bede97
commit 20a25caba7
2 changed files with 5 additions and 1 deletions

View File

@@ -306,6 +306,10 @@ void cdrom_reset_cdb_len(int id)
void cdrom_set_signature(int id)
{
if (id >= CDROM_NUM)
{
return;
}
cdrom[id].phase = 1;
cdrom[id].request_length = 0xEB14;
}