Backport 0.9.38.5 patch

This commit is contained in:
twinaphex 2015-07-26 01:57:21 +02:00
parent 65acfbd654
commit af692fc3ee

View File

@ -455,26 +455,12 @@ static bool ValidateRawDataSector(uint8 *data, const uint32 lba)
static void DoREADBase(uint32 sa, uint32 sc)
{
int track;
if(sa > toc.tracks[100].lba) // Another one of those off-by-one PC-FX CD bugs.
{
CommandCCError(SENSEKEY_ILLEGAL_REQUEST, NSE_END_OF_VOLUME);
return;
}
if((track = toc.FindTrackByLBA(sa)) == 0)
{
CommandCCError(SENSEKEY_ILLEGAL_REQUEST, NSE_END_OF_VOLUME);
return;
}
if(!(toc.tracks[track].control) & 0x4)
{
CommandCCError(SENSEKEY_MEDIUM_ERROR, NSE_NOT_DATA_TRACK);
return;
}
// Case for READ(10) and READ(12) where sc == 0, and sa == toc.tracks[100].lba
if(!sc && sa == toc.tracks[100].lba)
{