summaryrefslogtreecommitdiff
path: root/tools/source/zcodec/zcodec.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source/zcodec/zcodec.cxx')
-rw-r--r--tools/source/zcodec/zcodec.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index b5c645ac92e2..92de8988ef62 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -153,7 +153,7 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
UpdateCRC( mpInBuf, nInToRead );
}
- err = inflate( PZSTREAM, Z_NO_FLUSH );
+ err = mbStatus ? inflate(PZSTREAM, Z_NO_FLUSH) : Z_ERRNO;
if ( err < 0 )
{
mbStatus = false;
@@ -220,7 +220,7 @@ long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
UpdateCRC( mpInBuf, nInToRead );
}
- err = inflate( PZSTREAM, Z_NO_FLUSH );
+ err = mbStatus ? inflate(PZSTREAM, Z_NO_FLUSH) : Z_ERRNO;
if ( err < 0 )
{
// Accept Z_BUF_ERROR as EAGAIN or EWOULDBLOCK.
@@ -273,7 +273,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize
UpdateCRC( mpInBuf, nInToRead );
}
- err = inflate( PZSTREAM, Z_NO_FLUSH );
+ err = mbStatus ? inflate(PZSTREAM, Z_NO_FLUSH) : Z_ERRNO;
if ( err < 0 )
{
// Accept Z_BUF_ERROR as EAGAIN or EWOULDBLOCK.