diff options
Diffstat (limited to 'common/rdr/ZlibOutStream.cxx')
-rw-r--r-- | common/rdr/ZlibOutStream.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/rdr/ZlibOutStream.cxx b/common/rdr/ZlibOutStream.cxx index 0eb89222..ba6f1785 100644 --- a/common/rdr/ZlibOutStream.cxx +++ b/common/rdr/ZlibOutStream.cxx @@ -144,9 +144,9 @@ void ZlibOutStream::deflate(int flush) return; do { - underlying->check(1); - zs->next_out = underlying->getptr(); - zs->avail_out = underlying->avail(); + size_t chunk; + zs->next_out = underlying->getptr(1); + zs->avail_out = chunk = underlying->avail(); #ifdef ZLIBOUT_DEBUG vlog.debug("calling deflate, avail_in %d, avail_out %d", @@ -167,7 +167,7 @@ void ZlibOutStream::deflate(int flush) zs->next_out-underlying->getptr()); #endif - underlying->setptr(zs->next_out); + underlying->setptr(chunk - zs->avail_out); } while (zs->avail_out == 0); } |