aboutsummaryrefslogtreecommitdiffstats
path: root/main/zlib/gzflush.patch
blob: 5e97e6573c5e2ec940c5484df407887b4f8a1171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/gzwrite.c	2010-01-18 21:18:27.000000000 +0100
+++ b/gzwrite.c	2010-01-28 04:37:20.330530306 +0100
@@ -435,7 +435,8 @@
     state = (gz_statep)file;
 
     /* check that we're writing and that there's no error */
-    if (state->mode != GZ_WRITE|| state->err != Z_OK)
+    if (state->mode != GZ_WRITE || state->err != Z_OK)
+        return Z_STREAM_ERROR;
 
     /* check flush parameter */
     if (flush < 0 || flush > Z_FINISH)