From 2e36bbeb7b7471fb425aa9bb546d60787cbdba29 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Tue, 31 May 2011 16:41:46 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@67226 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/cdrom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 6e0dc890..2d5d0e70 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -214,7 +214,8 @@ void adjustTransferIndex() case MODE_SIZE_2048: bufSize = 12 + 2048; break; } - cdr.transferIndex %= bufSize; + if (cdr.transferIndex >= bufSize) + cdr.transferIndex %= bufSize; } void cdrDecodedBufferInterrupt() @@ -2394,8 +2395,7 @@ void psxDma3(u32 madr, u32 bcr, u32 chcr) { { int i; - for(i = 0; i < cdsize; ++i) - { + for(i = 0; i < cdsize; ++i) { ptr[i] = cdr.Transfer[cdr.transferIndex]; cdr.transferIndex++; adjustTransferIndex(); -- cgit v1.2.3