aboutsummaryrefslogtreecommitdiff
path: root/src/SBaseCommon.cpp
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2022-02-13 11:33:38 +0100
committerGitHub <noreply@github.com>2022-02-13 11:33:38 +0100
commite51472f9ac8b2e0db0c9c359805aff3f6837c975 (patch)
treeb1f026437af9411ffd216e5406bfec4cd899e75a /src/SBaseCommon.cpp
parent02142e8837d3803a954579f21797d6da32657853 (diff)
parent503ab19d3d4253fb013752572c19c314d19de792 (diff)
Merge pull request #243 from ladislav-zezula/LZ_DefragmentHashTableBug
HashTableDefragmentationRemoved
Diffstat (limited to 'src/SBaseCommon.cpp')
-rw-r--r--src/SBaseCommon.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/SBaseCommon.cpp b/src/SBaseCommon.cpp
index 5b81bad..1209719 100644
--- a/src/SBaseCommon.cpp
+++ b/src/SBaseCommon.cpp
@@ -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))
{