Fixed wxZlibOutputStream::Sync

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux 1999-08-31 18:16:23 +00:00
parent 5360828db9
commit babd4308f2

View 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;