diff options
author | Ladislav Zezula <ladislav.zezula@avast.com> | 2021-07-06 18:29:52 +0200 |
---|---|---|
committer | Ladislav Zezula <ladislav.zezula@avast.com> | 2021-07-06 18:29:52 +0200 |
commit | 48c3ae62151efd49592cf75359ecf23cdab9b69d (patch) | |
tree | a08f578cb53ec9a9b7985c2698f9df023a2c50a0 | |
parent | ce074eaf7ace51fdb642f491e217d4f50e30150e (diff) |
Fixed ZLIB decompression
-rw-r--r-- | src/SCompression.cpp | 2 | ||||
-rw-r--r-- | 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);
|