From 48dbf357a334725059dd7ab12c4af041417e4dc4 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Mon, 13 Jan 2014 15:33:55 +0100 Subject: + Support for BOBA map protector --- src/SFileAttributes.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/SFileAttributes.cpp') diff --git a/src/SFileAttributes.cpp b/src/SFileAttributes.cpp index f947d79..a74b54f 100644 --- a/src/SFileAttributes.cpp +++ b/src/SFileAttributes.cpp @@ -328,6 +328,10 @@ int SAttrLoadAttributes(TMPQArchive * ha) // File table must be initialized assert(ha->pFileTable != NULL); + // Don't load the attributes file from malformer Warcraft III maps + if(ha->dwFlags & MPQ_FLAG_MALFORMED) + return ERROR_FILE_CORRUPT; + // Attempt to open the "(attributes)" file. // If it's not there, then the archive doesn't support attributes if(SFileOpenFileEx((HANDLE)ha, ATTRIBUTES_NAME, SFILE_OPEN_ANY_LOCALE, &hFile)) -- cgit v1.2.3