mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-02-03 04:56:25 +01:00
Fixed bugs
This commit is contained in:
@@ -683,7 +683,7 @@ DWORD ConvertMpqHeaderToFormat4(
|
||||
return ERROR_FAKE_MPQ_HEADER;
|
||||
|
||||
// Check for malformed MPQs
|
||||
if(pHeader->wFormatVersion != MPQ_FORMAT_VERSION_4 || (ByteOffset + pHeader->ArchiveSize64) != FileSize || (ByteOffset + pHeader->HiBlockTablePos64) >= FileSize)
|
||||
if(pHeader->wFormatVersion != MPQ_FORMAT_VERSION_4 || (ByteOffset + pHeader->ArchiveSize64) > FileSize || (ByteOffset + pHeader->HiBlockTablePos64) >= FileSize)
|
||||
{
|
||||
pHeader->wFormatVersion = MPQ_FORMAT_VERSION_4;
|
||||
pHeader->dwHeaderSize = MPQ_HEADER_SIZE_V4;
|
||||
|
||||
Reference in New Issue
Block a user