And another fix.

This commit is contained in:
OBattler
2022-01-10 20:26:36 +01:00
parent 6b7e674877
commit e0578fbf5b

View File

@@ -1635,6 +1635,10 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
/* If all the flag bits are cleared, then treat it as a non-data command. */
if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) == 0x00))
dev->sector_len = 0;
else if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) != 0x00)) {
scsi_cdrom_invalid_field(dev);
break;
}
break;
case GPCMD_READ_CD_OLD:
case GPCMD_READ_CD:
@@ -1653,6 +1657,10 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
/* If all the flag bits are cleared, then treat it as a non-data command. */
if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) == 0x00))
dev->sector_len = 0;
else if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) != 0x00)) {
scsi_cdrom_invalid_field(dev);
break;
}
break;
}