From 47b6b6eb4addd82a89d6bcd8fa92f9c0a09a5781 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Fri, 27 May 2016 16:50:50 +0200 Subject: + Support for MPQs that have invalid (and ignored) flags in the block table + Support for MPQs that have malformed block indexes (0x8000xxxx or 0x4000xxxx) --- src/SFileOpenFileEx.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/SFileOpenFileEx.cpp') diff --git a/src/SFileOpenFileEx.cpp b/src/SFileOpenFileEx.cpp index 3794680..afbfc78 100644 --- a/src/SFileOpenFileEx.cpp +++ b/src/SFileOpenFileEx.cpp @@ -309,8 +309,10 @@ bool WINAPI SFileOpenFileEx(HANDLE hMpq, const char * szFileName, DWORD dwSearch { if(pFileEntry == NULL || (pFileEntry->dwFlags & MPQ_FILE_EXISTS) == 0) nError = ERROR_FILE_NOT_FOUND; - if(pFileEntry != NULL && pFileEntry->dwFlags & ~MPQ_FILE_VALID_FLAGS) - nError = ERROR_NOT_SUPPORTED; + + // Ignore unknown loading flags (example: MPQ_2016_v1_WME4_4.w3x) +// if(pFileEntry != NULL && pFileEntry->dwFlags & ~MPQ_FILE_VALID_FLAGS) +// nError = ERROR_NOT_SUPPORTED; } // Did the caller just wanted to know if the file exists? -- cgit v1.2.3