From 9915997070a0b7e6c487d0bd5252eb2f8dab5573 Mon Sep 17 00:00:00 2001 From: Zezula Ladislav Date: Thu, 12 Jan 2017 04:58:27 +0100 Subject: + By "2 GB", I really mean 2 GB. --- src/SBaseFileTable.cpp | 2 +- test/StormTest.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/SBaseFileTable.cpp b/src/SBaseFileTable.cpp index c7a26aa..50bf69e 100644 --- a/src/SBaseFileTable.cpp +++ b/src/SBaseFileTable.cpp @@ -600,7 +600,7 @@ static bool IsValidHashEntry1(TMPQArchive * ha, TMPQHash * pHash, TMPQBlock * pB // Check whether this is an existing file // Also we do not allow to be file size greater than 2GB - if((pBlock->dwFlags & MPQ_FILE_EXISTS) && (pBlock->dwFSize & 0x8000000) == 0) + if((pBlock->dwFlags & MPQ_FILE_EXISTS) && (pBlock->dwFSize & 0x80000000) == 0) { // The begin of the file must be within the archive ByteOffset = FileOffsetFromMpqOffset(ha, pBlock->dwFilePos); diff --git a/test/StormTest.cpp b/test/StormTest.cpp index 7909dfd..21dcb7b 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -4550,11 +4550,9 @@ int main(int argc, char * argv[]) if(nError == ERROR_SUCCESS) nError = TestOpenArchive("MPQ_2016_v1_KoreanFile.w3m"); */ -// if(nError == ERROR_SUCCESS) -// nError = TestOpenArchive_ProtectedMap("MPQ_2016_v1_ProtectedMap123.w3x", NULL, 17, "23b09ad3b8d89ec97df8860447abc7eb"); if(nError == ERROR_SUCCESS) - nError = TestOpenArchive_ProtectedMap("MPQ_2016_v1_UnableToOpen.w3x", NULL, 17, "23b09ad3b8d89ec97df8860447abc7eb"); + nError = TestOpenArchive_ProtectedMap("War3TFT_127b_Russian.exe", NULL, 17, "War3patch.mpq"); /* // Open the multi-file archive with wrong prefix to see how StormLib deals with it -- cgit v1.2.3