Sanitized the buffer zeroing on REQUEST SENSE for both ATAPI and SCSI.

This commit is contained in:
OBattler
2017-01-05 04:46:50 +01:00
parent 66838be5f9
commit bb89a07a63
2 changed files with 5 additions and 2 deletions

View File

@@ -1946,7 +1946,10 @@ static void atapicommand(int ide_board)
temp_command = idebufferb[0];
/*Will return 18 bytes of 0*/
memset(idebufferb,0,512);
if (alloc_length != 0)
{
memset(idebufferb, 0, alloc_length);
}
idebufferb[0]=0x80|0x70;

View File

@@ -636,7 +636,7 @@ int cdrom_read_data(uint8_t *buffer)
}
}
// pclog("CD-ROM sector size: %i (%i, %i) [%04X]\n", cdrom_sector_size, cdrom_sector_type, real_sector_type, cdrom_sector_flags);
pclog("CD-ROM sector size: %i (%i, %i) [%04X]\n", cdrom_sector_size, cdrom_sector_type, real_sector_type, cdrom_sector_flags);
return cdrom_add_error_and_subchannel(b, real_sector_type);
}