From 6a867d33b5aa4ed67800cd64fe19d2902250bd96 Mon Sep 17 00:00:00 2001 From: katsu Date: Sun, 20 Jul 2003 02:06:15 +0000 Subject: * 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 --- ext/zlib/zlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zlib/zlib.c') 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); } } -- cgit v1.2.3