summaryrefslogtreecommitdiff
path: root/macosx/Pcsxr-QL
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2015-02-07 22:17:23 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2015-02-07 22:17:23 +0000
commit527da3c3bb8e367c731b7fe437f1283b2a549912 (patch)
tree583659074747347b56f6bb3cbe07228e72b19c43 /macosx/Pcsxr-QL
parent1b1d4c3f6a72dfe050ef652694f98a86ff8c7ea4 (diff)
OS X: Fix an off-by-one error that was causing the QuickLook and Spotlight plug-ins to crash.
The bug was also present in the app itself, but it didn't crash. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@93874 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/Pcsxr-QL')
-rw-r--r--macosx/Pcsxr-QL/PSXMemEnumerator.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/macosx/Pcsxr-QL/PSXMemEnumerator.m b/macosx/Pcsxr-QL/PSXMemEnumerator.m
index b5545da2..4cba0ef7 100644
--- a/macosx/Pcsxr-QL/PSXMemEnumerator.m
+++ b/macosx/Pcsxr-QL/PSXMemEnumerator.m
@@ -156,7 +156,7 @@ NSArray *CreateArrayByEnumeratingMemoryCardAtURL(NSURL *location)
i++;
continue;
}
- do {
+ while (i + x < MAX_MEMCARD_BLOCKS) {
McdBlock tmpBlock;
GetSoloBlockInfo((unsigned char *)memPtr, i + x + 1, &tmpBlock);
if ((tmpBlock.Flags & 0x3) == 0x3) {
@@ -167,7 +167,7 @@ NSArray *CreateArrayByEnumeratingMemoryCardAtURL(NSURL *location)
} else {
break;
}
- } while (i + x - 1 < MAX_MEMCARD_BLOCKS);
+ };
PcsxrMemoryObject *obj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&memBlock startingIndex:i size:x];
i += x;
if (MemBlockFlag(memBlock.Flags) == memFlagDeleted) {