mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-20 22:57:20 +01:00
+ Fixed possible division by zero in LoadMpqDataBitmap
+ Updated zlib to version 1.2.5 (the same like current WoW build uses)
This commit is contained in:
@@ -1769,7 +1769,7 @@ int LoadMpqDataBitmap(TMPQArchive * ha, ULONGLONG FileSize, bool * pbFileIsCompl
|
||||
// Note: Do not rely on file size when looking for the bitmap.
|
||||
// Battle.net.MPQ from SC2:HOTS (build 22342) has some data appended after the bitmap
|
||||
EndOfMpq = ha->MpqPos + ha->pHeader->ArchiveSize64;
|
||||
if(FileSize > EndOfMpq)
|
||||
if(FileSize > EndOfMpq && ha->pHeader->dwRawChunkSize != 0)
|
||||
{
|
||||
// Calculate the number of extra bytes for data bitmap
|
||||
DataBlockCount = (DWORD)(((ha->pHeader->ArchiveSize64 - 1) / ha->pHeader->dwRawChunkSize) + 1);
|
||||
|
||||
Reference in New Issue
Block a user