From c8db90a9c4dcf30b626861bfe6efeec818a78719 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Tue, 18 Mar 2014 10:53:53 +0100 Subject: + Size check for (attributes) is only performed in StormLib testprogram --- src/SFileAttributes.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/SFileAttributes.cpp') 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; } -- cgit v1.2.3