diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-05-15 13:59:47 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-05-15 13:59:47 +0200 |
commit | 6868b56e25e6ce80418219bd876ee2de7646cf63 (patch) | |
tree | 5ae64977e22c1cae071fb8704d8af44ee4fd0add /ext/zlib/zlib.c | |
parent | 00ea48ad43122c67c904965d4c315237740685ea (diff) | |
download | php-git-6868b56e25e6ce80418219bd876ee2de7646cf63.tar.gz |
Fix unrelated tests and zlib window size
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r-- | ext/zlib/zlib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 31fe18db02..8169424362 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -827,7 +827,7 @@ PHP_FUNCTION(inflate_init) zend_long encoding, window = 15; char *dict = NULL; size_t dictlen = 0; - HashTable *options; + HashTable *options = NULL; zval *option_buffer; if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "l|H", &encoding, &options)) { @@ -865,7 +865,7 @@ PHP_FUNCTION(inflate_init) if (encoding < 0) { encoding += 15 - window; } else { - encoding &= window; + encoding -= 15 - window; } if (Z_OK == inflateInit2(ctx, encoding)) { @@ -997,7 +997,7 @@ PHP_FUNCTION(deflate_init) zend_long encoding, level = -1, memory = 8, window = 15, strategy = Z_DEFAULT_STRATEGY; char *dict = NULL; size_t dictlen = 0; - HashTable *options = 0; + HashTable *options = NULL; zval *option_buffer; if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "l|H", &encoding, &options)) { @@ -1065,7 +1065,7 @@ PHP_FUNCTION(deflate_init) if (encoding < 0) { encoding += 15 - window; } else { - encoding &= window; + encoding -= 15 - window; } if (Z_OK == deflateInit2(ctx, level, Z_DEFLATED, encoding, memory, strategy)) { |