summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-12-12 08:45:54 -0800
committerPixel <pixel@nobis-crew.org>2011-12-12 08:45:54 -0800
commitb48f816aab0f343bc30c5ce36d5fff6b1e7f0d8d (patch)
tree60ec7f658adced3411ddfa7caf69bdb8a6285c28
parent258f8533164281e2288745d75a1c33997400a94c (diff)
Forgot an EAssert into the zlib code.
-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);