summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authorkatsu <katsu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-18 14:38:06 +0000
committerkatsu <katsu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-18 14:38:06 +0000
commit6262a99e9b72bd6bf235fb1c37f7b035191093d9 (patch)
treee3a9fbc119d07ade8e3b333d1e698b06e6cc5015 /ext/zlib/zlib.c
parentd21bd1c06dbd04b89cdf4d50ce85fede95a7bcc9 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c5
1 files changed, 5 insertions, 0 deletions
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);