Added a sanity fatal() to the x54x SCSI controller famility code.

This commit is contained in:
OBattler
2020-01-15 01:09:23 +01:00
parent 171cc75b1e
commit 47b61d5c42

View File

@@ -260,6 +260,11 @@ x54x_bios_scsi_command(scsi_device_t *dev, uint8_t *cdb, uint8_t *buf, int len,
return(completion_code(scsi_device_sense(dev)));
if (len > 0) {
if (dev->buffer_length == -1) {
fatal("Buffer length -1 when doing SCSI DMA\n");
return(0xff);
}
if (dev->phase == SCSI_PHASE_DATA_IN) {
if (buf)
memcpy(buf, dev->sc->temp_buffer, dev->buffer_length);