Fix crash when gzsetparams() attempted for transparent write.
gzsetparams() now returns a Z_STREAM_ERROR in this case.
diff --git a/gzwrite.c b/gzwrite.c
index eb8a0e5..3030d74 100644
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -609,7 +609,7 @@
strm = &(state->strm);
/* 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 || state->direct)
return Z_STREAM_ERROR;
/* if no change is requested, then do nothing */