+ Fixed bug in opening SQP archives

+ More efficient version of GetNearestPowerOfTwo
This commit is contained in:
Ladislav Zezula
2016-07-14 14:15:29 +02:00
parent 7597fe1702
commit f311254785
7 changed files with 24 additions and 24 deletions

View File

@@ -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);