1
0
Fork 0
forked from lthn/blockchain

fixed the same bug in gzip_encoder_lyambda::stop()

This commit is contained in:
sowle 2020-03-18 18:37:08 +03:00
parent 36af9759a2
commit cefa4b561f
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -345,8 +345,10 @@ namespace net_utils
result_packed_buff.resize(result_packed_buff.size() * 2);
continue;
}
if (result_packed_buff.size() != m_zstream.avail_out)
result_packed_buff.resize(result_packed_buff.size() - m_zstream.avail_out);
CHECK_AND_ASSERT_MES(result_packed_buff.size() >= m_zstream.avail_out, false, "result_packed_buff.size()=" << result_packed_buff.size() << " >= m_zstream.avail_out=" << m_zstream.avail_out);
result_packed_buff.resize(result_packed_buff.size() - m_zstream.avail_out);
m_initialized = false;
break;
}