From 88411a1f52c09776b0d25edf18b29e6245bed5ec Mon Sep 17 00:00:00 2001 From: yhirose Date: Wed, 27 Jan 2021 14:35:32 +0000 Subject: [PATCH] Fix #846 --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index be1f9d6..bcc5d5f 100644 --- a/httplib.h +++ b/httplib.h @@ -2484,7 +2484,7 @@ public: strm_.next_out = reinterpret_cast(buff.data()); ret = deflate(&strm_, flush); - assert(ret != Z_STREAM_ERROR); + if (ret == Z_STREAM_ERROR) { return false; } if (!callback(buff.data(), buff.size() - strm_.avail_out)) { return false;