diff options
Diffstat (limited to 'coding/zlib.cpp')
-rw-r--r-- | coding/zlib.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/coding/zlib.cpp b/coding/zlib.cpp index f54cc574b4..2d40bbcebe 100644 --- a/coding/zlib.cpp +++ b/coding/zlib.cpp @@ -57,6 +57,14 @@ ZLib::DeflateProcessor::DeflateProcessor(void const * data, size_t size, ZLib::L ZLib::DeflateProcessor::~DeflateProcessor() noexcept { + unsigned bytes = 0; + int bits = 0; + int const ret = deflatePending(&m_stream, &bytes, &bits); + UNUSED_VALUE(ret); + ASSERT_EQUAL(ret, Z_OK, ("")); + ASSERT_EQUAL(bytes, 0, ("Some bytes were not flushed:", bytes)); + ASSERT_EQUAL(bits, 0, ("Some bits were not flushed:", bits)); + if (m_init) deflateEnd(&m_stream); } |