CDImageMDS: Possible fix for multi-track images

This commit is contained in:
Connor McLaughlin 2021-12-25 14:28:06 +10:00
parent 592a591b5f
commit bee50481f5
1 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,8 @@ bool CDImageMds::OpenAndParse(const char* filename, Common::Error* error)
TrackEntry track;
std::memcpy(&track, &mds[track_offset], sizeof(track));
track_offset += sizeof(TrackEntry);
if (PackedBCDToBinary(track.track_number) != track_number)
{
Log_ErrorPrintf("Unexpected track number 0x%02X in track %u", track.track_number, track_number);