summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZezula Ladislav <ladislav.zezula@avast.com>2017-01-12 04:58:27 +0100
committerZezula Ladislav <ladislav.zezula@avast.com>2017-01-12 04:58:27 +0100
commit9915997070a0b7e6c487d0bd5252eb2f8dab5573 (patch)
tree6851b86a5ba2c703caac4214f2db34c6336ee871
parent57f87e898dad23b9ab46bfc137d79a54d138f70c (diff)
+ By "2 GB", I really mean 2 GB.
-rw-r--r--src/SBaseFileTable.cpp2
-rw-r--r--test/StormTest.cpp4
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