- fixed infinite loop in compression code.

This commit is contained in:
Christoph Oelckers 2019-11-08 17:50:32 +01:00
parent dc10a8b03d
commit d3e6807f61

View file

@ -732,7 +732,7 @@ size_t CompressedFileWriter::Write(const void *buffer, size_t bytes)
size_t towrite = bytes;
zipstream->next_in = (Bytef *)buffer;
while (bytes > 0)
while (towrite > 0)
{
auto chunk = std::min(towrite, (size_t)0x40000000);
zipstream->avail_in = chunk;