diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-05-28 18:40:00 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-08-31 00:04:52 +0200 |
| commit | b8f857448a835db045b62c8f445782b761105f36 (patch) | |
| tree | 4af4fe6ab4b1548ee77ed18c03373c4fe4afab70 | |
| parent | 177c2d8c1ed33391711524948fef5313c8624c75 (diff) | |
| download | cc4group-b8f857448a835db045b62c8f445782b761105f36.tar.gz cc4group-b8f857448a835db045b62c8f445782b761105f36.zip | |
Fix possibly wrong error checking of deflate
| -rw-r--r-- | src/cc4group.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cc4group.c b/src/cc4group.c index 3c921e5..4be201c 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -2356,7 +2356,7 @@ static bool cc4group_deflateToCallback(WriteCallback* const callback, const void ret = deflate(&callback->gzStream, Z_NO_FLUSH); } - while(ret == Z_BUF_ERROR || callback->gzStream.avail_in > 0) + while(ret == Z_BUF_ERROR || callback->gzStream.avail_in > 0 || (ret == Z_OK && flushMode == Z_FINISH)) { callback->gzStream.next_out = callback->buffer + callback->position; callback->gzStream.avail_out = callback->bufferSize - callback->position; |
