+ Size check for (attributes) is only performed in StormLib testprogram

This commit is contained in:
Ladislav Zezula
2014-03-18 10:53:53 +01:00
parent 568f189ea5
commit c8db90a9c4
2 changed files with 10 additions and 0 deletions

View File

@@ -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;
}