From 6262a99e9b72bd6bf235fb1c37f7b035191093d9 Mon Sep 17 00:00:00 2001 From: katsu Date: Wed, 18 Jun 2003 14:38:06 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 73efe8e01b..24f226843f 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -692,6 +692,11 @@ zstream_run(z, src, len, flush) break; } if (err != Z_OK) { + if (flush != Z_FINISH && err == Z_BUF_ERROR + && z->stream.avail_out > 0) { + z->flags |= ZSTREAM_FLAG_IN_STREAM; + break; + } zstream_reset_input(z); if (z->stream.avail_in > 0) { zstream_append_input(z, z->stream.next_in, z->stream.avail_in);