From: Vadim Zeitlin Date: Sat, 11 May 2002 15:08:53 +0000 (+0000) Subject: fixed incorrect assert for the default compression level value X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/af850422ad0402f041a067c2b07d6586f80910f9 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 --- diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index 2636efd14b..4c7a7bf0ec 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -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) {