mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
gzip_read: always call gzclearerr
This is necessary when using a POSIX-compliant stdio implementation, which will set the FILE error flag when input from the pipe is exhausted, causing all subsequent reads to fail.
This commit is contained in:
parent
dfbbde1952
commit
d2b8e06f41
@ -33,6 +33,7 @@ gzip_open(struct stream_encoded *stream, int fd)
|
|||||||
static int
|
static int
|
||||||
gzip_read(struct stream_encoded *stream, unsigned char *data, int len)
|
gzip_read(struct stream_encoded *stream, unsigned char *data, int len)
|
||||||
{
|
{
|
||||||
|
gzclearerr((gzFile *) stream->data);
|
||||||
return gzread((gzFile *) stream->data, data, len);
|
return gzread((gzFile *) stream->data, data, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user