]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/zstream.cpp
serbase.cpp added to the list of files
[wxWidgets.git] / src / common / zstream.cpp
index 8ccb8710db3fe5e622d065a4742c6609a0fcf3d5..d6e0b5731bc742d3e146fdff245e18f06ab9453a 100644 (file)
@@ -160,6 +160,19 @@ void wxZlibOutputStream::Sync()
     return;
   }
 
+  // Fixed by "Stefan Csomor" <csomor@advancedconcepts.ch>
+  while( m_deflate->avail_out == 0 )
+  {
+     m_parent_o_stream->Write(m_z_buffer, m_z_size );
+     m_deflate->next_out  = m_z_buffer;
+     m_deflate->avail_out = m_z_size;
+     err = deflate(m_deflate, Z_FULL_FLUSH);
+     if (err != Z_OK) {
+        return;
+     }
+  }
+  // End
+
   m_parent_o_stream->Write(m_z_buffer, m_z_size-m_deflate->avail_out);
   m_deflate->next_out  = m_z_buffer;
   m_deflate->avail_out = m_z_size;