From 48c3ae62151efd49592cf75359ecf23cdab9b69d Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Tue, 6 Jul 2021 18:29:52 +0200 Subject: Fixed ZLIB decompression --- src/SCompression.cpp | 2 +- test/StormTest.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SCompression.cpp b/src/SCompression.cpp index df4ee16..ae7082b 100644 --- a/src/SCompression.cpp +++ b/src/SCompression.cpp @@ -176,7 +176,7 @@ int Decompress_ZLIB(void * pvOutBuffer, int * pcbOutBuffer, void * pvInBuffer, i inflateEnd(&z); } - return (nResult == Z_OK); + return (nResult >= Z_OK); } /******************************************************************************/ diff --git a/test/StormTest.cpp b/test/StormTest.cpp index 8786b06..44d65de 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -1524,8 +1524,8 @@ static TFileData * LoadMpqFile(TLogHelper * pLogger, HANDLE hMpq, LPCSTR szFileN // Load the entire file if(dwErrCode == ERROR_SUCCESS) { - if(!stricmp(szFileName, "replay.game.events")) - __debugbreak(); + //if(!stricmp(szFileName, "replay.game.events")) + // __debugbreak(); // Read the file data SFileReadFile(hFile, pFileData->FileData, dwFileSizeLo, &dwBytesRead, NULL); -- cgit v1.2.3