summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/deflate.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/deflate.cpp b/src/deflate.cpp
index 2d925a7..704d172 100644
--- a/src/deflate.cpp
+++ b/src/deflate.cpp
@@ -123,6 +123,8 @@ void Bu::Deflate::zError( int code )
123Bu::size Bu::Deflate::read( void *pData, Bu::size nBytes ) 123Bu::size Bu::Deflate::read( void *pData, Bu::size nBytes )
124{ 124{
125 TRACE( pData, nBytes ); 125 TRACE( pData, nBytes );
126 if( nBytes <= 0 )
127 return 0;
126 if( !pState->state ) 128 if( !pState->state )
127 { 129 {
128 bReading = true; 130 bReading = true;
@@ -191,6 +193,8 @@ Bu::size Bu::Deflate::read( void *pData, Bu::size nBytes )
191Bu::size Bu::Deflate::write( const void *pData, Bu::size nBytes ) 193Bu::size Bu::Deflate::write( const void *pData, Bu::size nBytes )
192{ 194{
193 TRACE( pData, nBytes ); 195 TRACE( pData, nBytes );
196 if( nBytes <= 0 )
197 return 0;
194 if( !pState->state ) 198 if( !pState->state )
195 { 199 {
196 bReading = false; 200 bReading = false;