Skip to content

Commit 9915997

Browse files
author
Zezula Ladislav
committed
+ By "2 GB", I really mean 2 GB.
1 parent 57f87e8 commit 9915997

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/SBaseFileTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ static bool IsValidHashEntry1(TMPQArchive * ha, TMPQHash * pHash, TMPQBlock * pB
600600

601601
// Check whether this is an existing file
602602
// Also we do not allow to be file size greater than 2GB
603-
if((pBlock->dwFlags & MPQ_FILE_EXISTS) && (pBlock->dwFSize & 0x8000000) == 0)
603+
if((pBlock->dwFlags & MPQ_FILE_EXISTS) && (pBlock->dwFSize & 0x80000000) == 0)
604604
{
605605
// The begin of the file must be within the archive
606606
ByteOffset = FileOffsetFromMpqOffset(ha, pBlock->dwFilePos);

test/StormTest.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,11 +4550,9 @@ int main(int argc, char * argv[])
45504550
if(nError == ERROR_SUCCESS)
45514551
nError = TestOpenArchive("MPQ_2016_v1_KoreanFile.w3m");
45524552
*/
4553-
// if(nError == ERROR_SUCCESS)
4554-
// nError = TestOpenArchive_ProtectedMap("MPQ_2016_v1_ProtectedMap123.w3x", NULL, 17, "23b09ad3b8d89ec97df8860447abc7eb");
45554553

45564554
if(nError == ERROR_SUCCESS)
4557-
nError = TestOpenArchive_ProtectedMap("MPQ_2016_v1_UnableToOpen.w3x", NULL, 17, "23b09ad3b8d89ec97df8860447abc7eb");
4555+
nError = TestOpenArchive_ProtectedMap("War3TFT_127b_Russian.exe", NULL, 17, "War3patch.mpq");
45584556

45594557
/*
45604558
// Open the multi-file archive with wrong prefix to see how StormLib deals with it

0 commit comments

Comments
 (0)