+ Defragmenting file table fixed

This commit is contained in:
unknown
2015-04-21 19:36:13 +02:00
parent 68e2c2527d
commit 5747ad4910
8 changed files with 87 additions and 97 deletions

View File

@@ -382,7 +382,6 @@ static LPBYTE CreateListFile(TMPQArchive * ha, DWORD * pcbListFile)
// If the file name is already there, does nothing.
static int SListFileCreateNodeForAllLocales(TMPQArchive * ha, const char * szFileName)
{
TMPQHeader * pHeader = ha->pHeader;
TFileEntry * pFileEntry;
TMPQHash * pFirstHash;
TMPQHash * pHash;
@@ -410,7 +409,7 @@ static int SListFileCreateNodeForAllLocales(TMPQArchive * ha, const char * szFil
while(pHash != NULL)
{
// Is it a valid file table index ?
if(pHash->dwBlockIndex < pHeader->dwBlockTableSize)
if(pHash->dwBlockIndex < ha->dwFileTableSize)
{
// Allocate file name for the file entry
AllocateFileName(ha, ha->pFileTable + pHash->dwBlockIndex, szFileName);