From b48f816aab0f343bc30c5ce36d5fff6b1e7f0d8d Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 12 Dec 2011 08:45:54 -0800 Subject: Forgot an EAssert into the zlib code. --- src/ZHandle.cc | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v1.2.3