diff options
author | Ladislav Zezula <zezula@volny.cz> | 2020-11-21 04:27:09 +0100 |
---|---|---|
committer | Ladislav Zezula <zezula@volny.cz> | 2020-11-21 04:27:09 +0100 |
commit | 809005c7f025bcc55bfa4ede78cb4cc45d3c0e6c (patch) | |
tree | e5d10b093dd215147f3e7128b11f96cc6afed04a /src/SBaseFileTable.cpp | |
parent | aea84bea149020385eadcd3df348d8e6fcbab733 (diff) |
* Release 9.23v9.23
* Fixed regressions
* Fixed test program
Diffstat (limited to 'src/SBaseFileTable.cpp')
-rw-r--r-- | src/SBaseFileTable.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SBaseFileTable.cpp b/src/SBaseFileTable.cpp index af8d290..7fe1042 100644 --- a/src/SBaseFileTable.cpp +++ b/src/SBaseFileTable.cpp @@ -432,9 +432,9 @@ int ConvertMpqHeaderToFormat4( // If version 1.0 is forced, then the format version is forced to be 1.0
// Reason: Storm.dll in Warcraft III ignores format version value
- if((dwFlags & MPQ_OPEN_FORCE_MPQ_V1) || (MapType == MapTypeWarcraft3))
+ if((MapType == MapTypeWarcraft3) || (dwFlags & MPQ_OPEN_FORCE_MPQ_V1))
wFormatVersion = MPQ_FORMAT_VERSION_1;
- if(MapType == MapTypeStarcraft2)
+ if((MapType == MapTypeStarcraft2) && (pHeader->wFormatVersion > MPQ_FORMAT_VERSION_4))
wFormatVersion = MPQ_FORMAT_VERSION_4;
// Format-specific fixes
@@ -647,7 +647,7 @@ int ConvertMpqHeaderToFormat4( return ERROR_FAKE_MPQ_HEADER;
// Check for malformed MPQs
- if(pHeader->wFormatVersion != MPQ_FORMAT_VERSION_4 || (ha->MpqPos + pHeader->ArchiveSize64) != FileSize || (ha->MpqPos + pHeader->HiBlockTablePos64) >= FileSize)
+ if(pHeader->wFormatVersion != MPQ_FORMAT_VERSION_4 || (MpqOffset + pHeader->ArchiveSize64) != FileSize || (MpqOffset + pHeader->HiBlockTablePos64) >= FileSize)
{
pHeader->wFormatVersion = MPQ_FORMAT_VERSION_4;
pHeader->dwHeaderSize = MPQ_HEADER_SIZE_V4;
|