mirror of
https://github.com/zlib-ng/minizip-ng
synced 2026-08-25 14:26:08 -04:00
Fix issue with truncated ZLIB output.
This commit is contained in:
parent
edebe6891d
commit
58dfe87d1d
1 changed files with 1 additions and 3 deletions
|
|
@ -168,8 +168,6 @@ int32_t mz_stream_zlib_read(void *stream, void *buf, int32_t size)
|
|||
|
||||
if (read < 0)
|
||||
return read;
|
||||
if (read == 0)
|
||||
break;
|
||||
|
||||
zlib->zstream.next_in = zlib->buffer;
|
||||
zlib->zstream.avail_in = read;
|
||||
|
|
@ -205,7 +203,7 @@ int32_t mz_stream_zlib_read(void *stream, void *buf, int32_t size)
|
|||
break;
|
||||
}
|
||||
}
|
||||
while (zlib->zstream.avail_out > 0);
|
||||
while (zlib->zstream.avail_out > 0 && (in_bytes > 0 || out_bytes > 0));
|
||||
|
||||
if (zlib->error != 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue