mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-20 14:47:22 +01:00
+ Fixed bug when SFileAddFileEx could add a file with MPQ_FILE_SINGLE_UNIT to a Warcraft III map
This commit is contained in:
@@ -351,7 +351,7 @@ 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) || (bIsWarcraft3Map))
|
||||
if((dwFlags & MPQ_OPEN_FORCE_MPQ_V1) || bIsWarcraft3Map)
|
||||
wFormatVersion = MPQ_FORMAT_VERSION_1;
|
||||
|
||||
// Format-specific fixes
|
||||
@@ -752,7 +752,7 @@ static int BuildFileTableFromBlockTable(
|
||||
assert(ha->dwFileTableSize >= ha->dwMaxFileCount);
|
||||
|
||||
// MPQs for Warcraft III doesn't know some flags, namely MPQ_FILE_SINGLE_UNIT and MPQ_FILE_PATCH_FILE
|
||||
dwFlagMask = (ha->dwFlags & MPQ_FLAG_WAR3_MAP) ? ~(MPQ_FILE_SINGLE_UNIT | MPQ_FILE_PATCH_FILE) : 0xFFFFFFFF;
|
||||
dwFlagMask = (ha->dwFlags & MPQ_FLAG_WAR3_MAP) ? MPQ_FILE_VALID_FLAGS_W3X : MPQ_FILE_VALID_FLAGS;
|
||||
|
||||
// Defragment the hash table, if needed
|
||||
if(ha->dwFlags & MPQ_FLAG_HASH_TABLE_CUT)
|
||||
|
||||
Reference in New Issue
Block a user