+ Fixed use-after-free in SListFileFindFirstFile

+ Replaces SFileMpqIsReadOnly with SFileMpqFlags
+ New MPQ flag: MPQ_FLAG_WAR3_MAP
This commit is contained in:
unknown
2015-04-18 16:58:14 +02:00
parent ef12717cf9
commit d47864c13d
8 changed files with 127 additions and 82 deletions

View File

@@ -370,6 +370,10 @@ bool WINAPI SFileOpenArchive(
if(dwFlags & (MPQ_OPEN_NO_LISTFILE | MPQ_OPEN_NO_ATTRIBUTES))
ha->dwFlags |= MPQ_FLAG_READ_ONLY;
// Remember whether whis is a map for Warcraft III
if(bIsWarcraft3Map)
ha->dwFlags |= MPQ_FLAG_WAR3_MAP;
// Set the size of file sector
ha->dwSectorSize = (0x200 << ha->pHeader->wSectorSize);