mirror of
https://github.com/msgpack/msgpack-c
synced 2026-06-08 16:11:40 +00:00
addf52e9f0
When a zlib stream has avail_in == 0, it will deflate with a Z_BUF_ERROR to indicate that "no progress is possible". A zbuffer write with an empty string will trigger this condition, and the write call returns/raises an error/exception. The fix is simple: change the do/while to a while loop, so that it only tries to deflate if there is actually data to deflate.