Folder memcards: prevent out of bounds access

This commit is contained in:
Ziemas 2021-01-07 06:40:48 +01:00 committed by Kojin
parent 95e7045db7
commit 1f236cab75
1 changed files with 1 additions and 1 deletions

View File

@ -560,7 +560,7 @@ MemoryCardFileMetadataReference* FolderMemoryCard::AddFileEntryToMetadataQuickAc
ref->entry = entry;
ref->consecutiveCluster = clusterNumber;
++clusterNumber;
} while ( ( fileCluster = m_fat.data[0][0][fileCluster] ) != ( LastDataCluster | DataClusterInUseMask ) );
} while ( ( fileCluster = m_fat.data[0][0][fileCluster & NextDataClusterMask]) != ( LastDataCluster | DataClusterInUseMask ) );
return &m_fileMetadataQuickAccess[firstFileCluster & NextDataClusterMask];
}