summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ZHandle.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ZHandle.cc b/src/ZHandle.cc
index 7e1d139..fd78b53 100644
--- a/src/ZHandle.cc
+++ b/src/ZHandle.cc
@@ -130,6 +130,7 @@ void Balau::ZStream::doFlush(bool finish) {
m_zout.next_out = (Bytef *) buf;
m_zout.avail_out = BLOCK_SIZE;
r = deflate(&m_zout, finish ? Z_FINISH : Z_SYNC_FLUSH);
+ EAssert((r == Z_OK) || ((r == Z_STREAM_END) && finish), "deflate() didn't return Z_OK or Z_STREAM_END, but %i (finish = %s)", r, finish ? "true" : "false");
size_t compressed = BLOCK_SIZE - m_zout.avail_out;
if (compressed) {
size_t w = m_h->write(buf, compressed);