diff options
author | Ladislav Zezula <ladislav.zezula@avg.com> | 2014-03-18 10:53:53 +0100 |
---|---|---|
committer | Ladislav Zezula <ladislav.zezula@avg.com> | 2014-03-18 10:53:53 +0100 |
commit | c8db90a9c4dcf30b626861bfe6efeec818a78719 (patch) | |
tree | 85a9c617fa153184a5a92da1a14aa475feced408 /src/SFileAttributes.cpp | |
parent | 568f189ea5a850a9259c8c89ba5f28a0630a2ce0 (diff) |
+ Size check for (attributes) is only performed in StormLib testprogram
Diffstat (limited to 'src/SFileAttributes.cpp')
-rw-r--r-- | src/SFileAttributes.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/SFileAttributes.cpp b/src/SFileAttributes.cpp index 2589fc3..aafd4c3 100644 --- a/src/SFileAttributes.cpp +++ b/src/SFileAttributes.cpp @@ -125,8 +125,13 @@ static DWORD CheckSizeOfAttributesFile(DWORD cbAttrFile, DWORD dwAttrFlags, DWOR if(cbAttrFile == (cbHeaderSize + cbChecksumSize1 + cbFileTimeSize1 + cbFileHashSize1 + cbPatchBitSize3)) return dwFileTableSize; +#ifdef __STORMLIB_TEST__ // Invalid size of the (attributes) file + // Note that many MPQs, especially Warcraft III maps have the size of (attributes) invalid. + // We only perform this check if this is the STORMLIB testprogram itself assert(false); +#endif + return 0; } |