diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-05 06:10:16 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-05 06:10:16 +0000 |
commit | 771947f7607661e13357caebb7c2b27dc474be88 (patch) | |
tree | 5f6fa6ac96082df8d29f43504965c405cf7afaa2 /plugins/Zlib/src/deflate.c | |
parent | cfe8ca0a75ce9dcb2044e6e17f40b294f35d6366 (diff) |
zlib update to 1.2.8
git-svn-id: http://svn.miranda-ng.org/main/trunk@5582 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Zlib/src/deflate.c')
-rw-r--r-- | plugins/Zlib/src/deflate.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Zlib/src/deflate.c b/plugins/Zlib/src/deflate.c index 9e4c2cbc8a..696957705b 100644 --- a/plugins/Zlib/src/deflate.c +++ b/plugins/Zlib/src/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.7 Copyright 1995-2012 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -305,7 +305,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || s->pending_buf == Z_NULL) { s->status = FINISH_STATE; - strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + strm->msg = ERR_MSG(Z_MEM_ERROR); deflateEnd (strm); return Z_MEM_ERROR; } @@ -329,7 +329,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) uInt str, n; int wrap; unsigned avail; - unsigned char *next; + z_const unsigned char *next; if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL) return Z_STREAM_ERROR; @@ -359,7 +359,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) avail = strm->avail_in; next = strm->next_in; strm->avail_in = dictLength; - strm->next_in = (Bytef *)dictionary; + strm->next_in = (z_const Bytef *)dictionary; fill_window(s); while (s->lookahead >= MIN_MATCH) { str = s->strstart; @@ -513,6 +513,8 @@ int ZEXPORT deflateParams(strm, level, strategy) strm->total_in != 0) { /* Flush the last buffer: */ err = deflate(strm, Z_BLOCK); + if (err == Z_BUF_ERROR && s->pending == 0) + err = Z_OK; } if (s->level != level) { s->level = level; |