From 5747ad4910966b27b4da3f0d0e5f085697e5bf7b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Apr 2015 19:36:13 +0200 Subject: + Defragmenting file table fixed --- src/SFileListFile.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/SFileListFile.cpp') diff --git a/src/SFileListFile.cpp b/src/SFileListFile.cpp index f5251bc..5f8a9df 100644 --- a/src/SFileListFile.cpp +++ b/src/SFileListFile.cpp @@ -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); -- cgit v1.2.3