diff --git a/src/ide.c b/src/ide.c index ac3d583cd..cd3300612 100644 --- a/src/ide.c +++ b/src/ide.c @@ -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; diff --git a/src/scsi_cdrom.c b/src/scsi_cdrom.c index 099ca1c23..1528fea91 100644 --- a/src/scsi_cdrom.c +++ b/src/scsi_cdrom.c @@ -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); }