aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gzwrite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gzwrite.c b/gzwrite.c
index eb8a0e5..3030d74 100644
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -609,7 +609,7 @@ int ZEXPORT gzsetparams(file, level, strategy)
609 strm = &(state->strm); 609 strm = &(state->strm);
610 610
611 /* check that we're writing and that there's no error */ 611 /* check that we're writing and that there's no error */
612 if (state->mode != GZ_WRITE || state->err != Z_OK) 612 if (state->mode != GZ_WRITE || state->err != Z_OK || state->direct)
613 return Z_STREAM_ERROR; 613 return Z_STREAM_ERROR;
614 614
615 /* if no change is requested, then do nothing */ 615 /* if no change is requested, then do nothing */