summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authorkatsu <katsu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-20 02:06:15 +0000
committerkatsu <katsu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-20 02:06:15 +0000
commit6a867d33b5aa4ed67800cd64fe19d2902250bd96 (patch)
tree73c090ade7815a79a0fdbcff80d971a190ec292d /ext/zlib
parentfe4de8b4b8a614e6fdd04766a45b996346d9e028 (diff)
* ext/zlib/zlib.c (gzfile_read_header): gz->z.input may be nil after finishing reading a gzip header.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 24f226843f..e1aebe446f 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -1697,7 +1697,7 @@ gzfile_read_header(gz)
zstream_discard_input(&gz->z, len + 1);
}
- if (RSTRING(gz->z.input)->len > 0) {
+ if (gz->z.input != Qnil && RSTRING(gz->z.input)->len > 0) {
zstream_run(&gz->z, 0, 0, Z_SYNC_FLUSH);
}
}