Fix bug in gzwrite.c that produced corrupt gzip files.
diff --git a/gzwrite.c b/gzwrite.c
index a2ee573..1ec1da4 100644
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -117,6 +117,7 @@
             if (strm->avail_out == 0) {
                 strm->avail_out = state->size;
                 strm->next_out = state->out;
+                state->x.next = state->out;
             }
         }