]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/zstream.cpp
Fix wxSnvprintf (and hence wxString::Format) for Unicode, when using
[wxWidgets.git] / src / common / zstream.cpp
index 2636efd14b5b04e66b0ac22249de7326d28f519f..4c7a7bf0ecf614d11570bb0f2f4ca43ae999f5e7 100644 (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) {