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:
parent
5360828db9
commit
babd4308f2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user