From f3112547853a361f9c5419cfb6810b2a54c643e6 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Thu, 14 Jul 2016 14:15:29 +0200 Subject: + Fixed bug in opening SQP archives + More efficient version of GetNearestPowerOfTwo --- src/SFileCreateArchive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SFileCreateArchive.cpp') diff --git a/src/SFileCreateArchive.cpp b/src/SFileCreateArchive.cpp index df32759..47354fe 100644 --- a/src/SFileCreateArchive.cpp +++ b/src/SFileCreateArchive.cpp @@ -178,7 +178,7 @@ bool WINAPI SFileCreateArchive2(const TCHAR * szMpqName, PSFILE_CREATE_MPQ pCrea } // If file count is not zero, initialize the hash table size - dwHashTableSize = GetHashTableSizeForFileCount(pCreateInfo->dwMaxFileCount + dwReservedFiles); + dwHashTableSize = GetNearestPowerOfTwo(pCreateInfo->dwMaxFileCount + dwReservedFiles); // Retrieve the file size and round it up to 0x200 bytes FileStream_GetSize(pStream, &MpqPos); -- cgit v1.2.3