Fix error check for zlib calls
There are multiple "okay" return values, not just Z_OK. Make sure we don't bail out needlessly.
This commit is contained in:
committed by
Lauri Kasanen
parent
49f9ce8e5b
commit
f38e474993
@@ -141,7 +141,7 @@ bool ZlibInStream::decompress(bool wait)
|
||||
zs->avail_in = bytesIn;
|
||||
|
||||
int rc = inflate(zs, Z_SYNC_FLUSH);
|
||||
if (rc != Z_OK) {
|
||||
if (rc < 0) {
|
||||
throw Exception("ZlibInStream: inflate failed");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user