+ 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

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