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/SFileCompactArchive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SFileCompactArchive.cpp') diff --git a/src/SFileCompactArchive.cpp b/src/SFileCompactArchive.cpp index 57c8839..2895baa 100644 --- a/src/SFileCompactArchive.cpp +++ b/src/SFileCompactArchive.cpp @@ -481,7 +481,7 @@ bool WINAPI SFileSetMaxFileCount(HANDLE hMpq, DWORD dwMaxFileCount) if(nError == ERROR_SUCCESS) { // Calculate the hash table size for the new file limit - dwNewHashTableSize = GetHashTableSizeForFileCount(dwMaxFileCount); + dwNewHashTableSize = GetNearestPowerOfTwo(dwMaxFileCount); // Rebuild both file tables nError = RebuildFileTable(ha, dwNewHashTableSize); -- cgit v1.2.3