X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fcdrom.c;h=bc973e904fe79b531fa2b3796eba62db2915a2b5;hp=2ce7fe97b048d9b398efbed95dd9acc37599c883;hb=f3746eea2d69d08948522600b99388618ec46f1b;hpb=76c06a1a8a2c359341a086c87c9a12c9926c440f diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 2ce7fe97..bc973e90 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -462,12 +462,13 @@ static int ReadTrack(const u8 *time) static void UpdateSubq(const u8 *time) { const struct SubQ *subq; + int s = MSF2SECT(time[0], time[1], time[2]); u16 crc; - if (CheckSBI(time)) + if (CheckSBI(s)) return; - subq = (struct SubQ *)CDR_getBufferSub(MSF2SECT(time[0], time[1], time[2])); + subq = (struct SubQ *)CDR_getBufferSub(s); if (subq != NULL && cdr.CurTrack == 1) { crc = calcCrc((u8 *)subq + 12, 10); if (crc == (((u16)subq->CRC[0] << 8) | subq->CRC[1])) {