wininet: Don't use returned read size if read failed in gzip_read.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-04-07 17:31:02 +02:00 committed by Alexandre Julliard
parent 250f719749
commit 7d8cf318a4
1 changed files with 1 additions and 1 deletions

View File

@ -466,10 +466,10 @@ static DWORD gzip_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DW
}
res = gzip_stream->parent_stream->vtbl->read(gzip_stream->parent_stream, req, gzip_stream->buf+gzip_stream->buf_size,
sizeof(gzip_stream->buf)-gzip_stream->buf_size, &current_read, allow_blocking);
gzip_stream->buf_size += current_read;
if(res != ERROR_SUCCESS)
break;
gzip_stream->buf_size += current_read;
if(!current_read) {
WARN("unexpected end of data\n");
gzip_stream->end_of_data = TRUE;