summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index f3d51a4d0f..8169424362 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -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)) {
@@ -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)) {