mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-17 13:40:33 +01:00
SFileAddListFile optimized for protectors that set too large hash table
This commit is contained in:
@@ -992,7 +992,7 @@ void * LoadMpqTable(
|
||||
DWORD dwCompressedSize,
|
||||
DWORD dwTableSize,
|
||||
DWORD dwKey,
|
||||
bool * pbTableIsCut)
|
||||
DWORD * PtrRealTableSize)
|
||||
{
|
||||
ULONGLONG FileSize = 0;
|
||||
LPBYTE pbCompressed = NULL;
|
||||
@@ -1037,13 +1037,15 @@ void * LoadMpqTable(
|
||||
// Fill the extra data with zeros
|
||||
dwBytesToRead = (DWORD)(FileSize - ByteOffset);
|
||||
memset(pbMpqTable + dwBytesToRead, 0, (dwTableSize - dwBytesToRead));
|
||||
|
||||
// Give the caller information that the table was cut
|
||||
if(pbTableIsCut != NULL)
|
||||
pbTableIsCut[0] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Give the caller information that the table was cut
|
||||
if(PtrRealTableSize != NULL)
|
||||
{
|
||||
PtrRealTableSize[0] = dwBytesToRead;
|
||||
}
|
||||
|
||||
// If everything succeeded, read the raw table from the MPQ
|
||||
if(FileStream_Read(ha->pStream, &ByteOffset, pbToRead, dwBytesToRead))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user