From 7819b07df5071d1278c93a7eb9ebc6abc141139c Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 26 May 2019 22:23:54 -0700 Subject: [PATCH] Fix crash in CompressionUtil::DecompressLZO Fix invalid ActorMultiKeyFrame template reference --- src/Core/CompressionUtil.cpp | 4 +++- templates/DKCR/Game.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Core/CompressionUtil.cpp b/src/Core/CompressionUtil.cpp index b38393a2..cdcd7b9b 100644 --- a/src/Core/CompressionUtil.cpp +++ b/src/Core/CompressionUtil.cpp @@ -105,7 +105,9 @@ namespace CompressionUtil bool DecompressLZO(uint8 *pSrc, uint32 SrcLen, uint8 *pDst, uint32& rTotalOut) { #if USE_LZOKAY - lzokay::EResult Result = lzokay::decompress(pSrc, (size_t) SrcLen, pDst, (size_t&) rTotalOut); + size_t TotalOut = rTotalOut; + lzokay::EResult Result = lzokay::decompress(pSrc, (size_t) SrcLen, pDst, TotalOut); + rTotalOut = TotalOut; if (Result < lzokay::EResult::Success) { diff --git a/templates/DKCR/Game.xml b/templates/DKCR/Game.xml index 1cec2ae8..6642e6bb 100644 --- a/templates/DKCR/Game.xml +++ b/templates/DKCR/Game.xml @@ -35,7 +35,7 @@ AMKF - + AOCL