mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -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
|
||||
gzip_read(struct stream_encoded *stream, unsigned char *data, int len)
|
||||
{
|
||||
gzclearerr((gzFile *) stream->data);
|
||||
return gzread((gzFile *) stream->data, data, len);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user