Fix RPak patch header size fields not getting set properly

Small mistake that happened when porting the decompressor over to the engine FileSystem API.
This commit is contained in:
Kawe Mazidjatari 2022-11-25 02:12:54 +01:00
parent ad690379ab
commit 9bc1a7f4e4

View File

@ -542,7 +542,7 @@ void RTech_Decompress_f(const CCommand& args)
for (uint32_t i = 1, nPatchOffset = (sizeof(RPakHeader_t) + sizeof(uint64_t));
i <= pHeader->m_nPatchIndex; i++, nPatchOffset += sizeof(RPakPatchCompressedHeader_t))
{
RPakPatchCompressedHeader_t* pPatchHeader = (RPakPatchCompressedHeader_t*)((uintptr_t)pPakBuf + nPatchOffset);
RPakPatchCompressedHeader_t* pPatchHeader = reinterpret_cast<RPakPatchCompressedHeader_t*>(pDecompBuf + nPatchOffset);
pPatchHeader->m_nSizeDisk = pPatchHeader->m_nSizeMemory; // Fix size for decompress.
}
}