Fix crash in StormLib

This commit is contained in:
ariel- committed 2016-01-11 01:50:41 -03:00
1 parent 6d04b6ecc6
commit 694c89d76d
2 files changed
+27 -1

No files matched your search

+5 -1
View File
@@ -225,8 +225,12 @@ static TFileEntry * FindPatchEntry(TMPQArchive * ha, TFileEntry * pFileEntry)
ha = ha->haPatch;
// Prepare the prefix for the file name
char* fileName = pFileEntry->szFileName;
if (fileName == NULL)
continue;
strcpy(szFileName, ha->szPatchPrefix);
strcat(szFileName, pFileEntry->szFileName);
strcat(szFileName, fileName);
// Try to find the file there
pTempEntry = GetFileEntryExact(ha, szFileName, lcLocale);