summaryrefslogtreecommitdiff
path: root/macosx/Psx-Memcard/GetMetadataForFile.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/Psx-Memcard/GetMetadataForFile.m')
-rw-r--r--macosx/Psx-Memcard/GetMetadataForFile.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/macosx/Psx-Memcard/GetMetadataForFile.m b/macosx/Psx-Memcard/GetMetadataForFile.m
index 41e0e224..78adda93 100644
--- a/macosx/Psx-Memcard/GetMetadataForFile.m
+++ b/macosx/Psx-Memcard/GetMetadataForFile.m
@@ -172,7 +172,7 @@ Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attribute
i++;
continue;
}
- do {
+ while (i + x < MAX_MEMCARD_BLOCKS) {
McdBlock tmpBlock;
GetSoloBlockInfo((unsigned char *)fileCData, i + x + 1, &tmpBlock);
if ((tmpBlock.Flags & 0x3) == 0x3) {
@@ -183,7 +183,7 @@ Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attribute
} else {
break;
}
- } while (i + x - 1 < MAX_MEMCARD_BLOCKS);
+ };
// Ignore deleted blocks
i += x;
if (MemBlockFlag(memBlock.Flags) == memFlagDeleted) {