diff --git a/mz_strm_bzip.c b/mz_strm_bzip.c index 7ac9a52e..2397c0d7 100644 --- a/mz_strm_bzip.c +++ b/mz_strm_bzip.c @@ -151,8 +151,6 @@ int32_t mz_stream_bzip_read(void *stream, void *buf, int32_t size) if (read < 0) return read; - if (read == 0) - break; bzip->bzstream.next_in = (char *)bzip->buffer; bzip->bzstream.avail_in = (uint32_t)read; @@ -188,7 +186,7 @@ int32_t mz_stream_bzip_read(void *stream, void *buf, int32_t size) break; } } - while ((bzip->bzstream.avail_out > 0) && (in_bytes > 0 || out_bytes > 0)); + while (bzip->bzstream.avail_out > 0); if (bzip->error != 0) return MZ_DATA_ERROR; diff --git a/mz_strm_lzma.c b/mz_strm_lzma.c index b0cb3597..f0dca510 100644 --- a/mz_strm_lzma.c +++ b/mz_strm_lzma.c @@ -183,8 +183,6 @@ int32_t mz_stream_lzma_read(void *stream, void *buf, int32_t size) if (read < 0) return read; - if (read == 0) - break; lzma->lstream.next_in = lzma->buffer; lzma->lstream.avail_in = (size_t)read; @@ -217,7 +215,7 @@ int32_t mz_stream_lzma_read(void *stream, void *buf, int32_t size) break; } } - while ((lzma->lstream.avail_out > 0) && (in_bytes > 0 || out_bytes > 0)); + while (lzma->lstream.avail_out > 0); if (lzma->error != 0) return MZ_DATA_ERROR; diff --git a/mz_strm_zlib.c b/mz_strm_zlib.c index 40a61e12..01d7dba7 100644 --- a/mz_strm_zlib.c +++ b/mz_strm_zlib.c @@ -203,7 +203,7 @@ int32_t mz_stream_zlib_read(void *stream, void *buf, int32_t size) break; } } - while ((zlib->zstream.avail_out > 0) && (in_bytes > 0 || out_bytes > 0)); + while (zlib->zstream.avail_out > 0); if (zlib->error != 0) {