summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-06-13 17:28:45 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-06-13 17:28:45 +0000
commit23b0669bc0c2e24a5b637f080e45553ed853d941 (patch)
tree5f777f6e6643302af509aaf714bd6d47137f68e4
parenta4c98a614298d56fae192528323dcc74c5465e75 (diff)
Pass -MAX_WBITS to inflateInit2/deflateInit2 instead of raw value of -15.
-rw-r--r--source/cl_main.c4
-rw-r--r--source/sv_init.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/cl_main.c b/source/cl_main.c
index faf3b7a..00ed437 100644
--- a/source/cl_main.c
+++ b/source/cl_main.c
@@ -3088,8 +3088,8 @@ void CL_Init( void ) {
IN_Init();
#if USE_ZLIB
- if( inflateInit2( &cls.z, -15 ) != Z_OK ) {
- Com_Error( ERR_FATAL, "inflateInit2() failed" );
+ if( inflateInit2( &cls.z, -MAX_WBITS ) != Z_OK ) {
+ Com_Error( ERR_FATAL, "%s: inflateInit2() failed", __func__ );
}
#endif
diff --git a/source/sv_init.c b/source/sv_init.c
index 1c0d90f..e439c02 100644
--- a/source/sv_init.c
+++ b/source/sv_init.c
@@ -244,7 +244,7 @@ void SV_InitGame( qboolean ismvd ) {
svs.z.zalloc = SV_Zalloc;
svs.z.zfree = SV_Zfree;
if( deflateInit2( &svs.z, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
- -15, 9, Z_DEFAULT_STRATEGY ) != Z_OK )
+ -MAX_WBITS, 9, Z_DEFAULT_STRATEGY ) != Z_OK )
{
Com_Error( ERR_FATAL, "%s: deflateInit2() failed", __func__ );
}