+ 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

@@ -701,7 +701,7 @@ static TMPQHash * DefragmentHashTable(
// Calculate how many entries in the hash table we really need
dwFirstFreeEntry = (DWORD)(pTarget - pHashTable);
dwNewTableSize = GetHashTableSizeForFileCount(dwFirstFreeEntry);
dwNewTableSize = GetNearestPowerOfTwo(dwFirstFreeEntry);
// Fill the rest with entries that look like deleted
pHashTableEnd = pHashTable + dwNewTableSize;