aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SFileAttributes.cpp1
-rw-r--r--src/SFileOpenArchive.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/SFileAttributes.cpp b/src/SFileAttributes.cpp
index dacfd3b..bd1956d 100644
--- a/src/SFileAttributes.cpp
+++ b/src/SFileAttributes.cpp
@@ -367,6 +367,7 @@ int SAttrLoadAttributes(TMPQArchive * ha)
// File table must be initialized
assert(ha->pFileTable != NULL);
+ assert((ha->dwFlags & MPQ_FLAG_BLOCK_TABLE_CUT) == 0);
// Don't load the attributes file from malformed Warcraft III maps
if(ha->dwFlags & MPQ_FLAG_MALFORMED)
diff --git a/src/SFileOpenArchive.cpp b/src/SFileOpenArchive.cpp
index 5ce4290..35fd4dd 100644
--- a/src/SFileOpenArchive.cpp
+++ b/src/SFileOpenArchive.cpp
@@ -410,7 +410,7 @@ bool WINAPI SFileOpenArchive(
}
// Load the "(attributes)" file and merge it to the file table
- if(nError == ERROR_SUCCESS && (dwFlags & MPQ_OPEN_NO_ATTRIBUTES) == 0)
+ if(nError == ERROR_SUCCESS && (dwFlags & MPQ_OPEN_NO_ATTRIBUTES) == 0 && (ha->dwFlags & MPQ_FLAG_BLOCK_TABLE_CUT) == 0)
{
// Quick check for (attributes)
pFileEntry = GetFileEntryLocale(ha, ATTRIBUTES_NAME, LANG_NEUTRAL);