aboutsummaryrefslogtreecommitdiff
path: root/src/SFileFindFile.cpp
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2020-03-25 17:36:20 +0100
committerLadislav Zezula <zezula@volny.cz>2020-03-25 17:36:20 +0100
commit1f17e92643dea4340719ed195f4425272a29301e (patch)
treebe0671bb87346960b75b8bd4a211f645deafbe7d /src/SFileFindFile.cpp
parentb60bc45088ffa77b00dffca928f99159cbcebd2f (diff)
Added checks for obviously fake files
Diffstat (limited to 'src/SFileFindFile.cpp')
-rw-r--r--src/SFileFindFile.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SFileFindFile.cpp b/src/SFileFindFile.cpp
index 9ff6ca1..30be19a 100644
--- a/src/SFileFindFile.cpp
+++ b/src/SFileFindFile.cpp
@@ -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))
{