fixed incorrect assert for the default compression level value

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-05-11 15:08:53 +00:00
parent 7a30264c3f
commit af850422ad

View File

@ -126,8 +126,14 @@ wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream, int level)
m_deflate->zfree = (free_func)0;
m_deflate->opaque = (voidpf)0;
if (level == -1) level = Z_DEFAULT_COMPRESSION;
wxASSERT_MSG(level >= 0 && level <= 9, wxT("wxZlibOutputStream compression level must be between 0 and 9!"));
if ( level == -1 )
{
level = Z_DEFAULT_COMPRESSION;
}
else
{
wxASSERT_MSG(level >= 0 && level <= 9, wxT("wxZlibOutputStream compression level must be between 0 and 9!"));
}
err = deflateInit(m_deflate, level);
if (err != Z_OK) {