Added checks for obviously fake files

This commit is contained in:
Ladislav Zezula
2020-03-25 17:36:20 +01:00
parent b60bc45088
commit 1f17e92643
3 changed files with 30 additions and 9 deletions

View File

@@ -222,6 +222,10 @@ static bool DoMPQSearch_FileEntry(
// Is it a file but not a patch file?
if((pFileEntry->dwFlags & hs->dwFlagMask) == MPQ_FILE_EXISTS)
{
// Ignore fake files which are not compressed but have size higher than the archive
if ((pFileEntry->dwFlags & MPQ_FILE_COMPRESS_MASK) == 0 && (pFileEntry->dwFileSize > ha->FileSize))
return false;
// Now we have to check if this file was not enumerated before
if(!FileWasFoundBefore(ha, hs, pFileEntry))
{