fix integer overflow

This commit is contained in:
arvidn 2017-01-26 23:39:56 -05:00
parent ba9fae8e1f
commit cca5ab8368
1 changed files with 1 additions and 1 deletions

View File

@ -5134,7 +5134,7 @@ namespace libtorrent
// only add new piece-chunks if the send buffer is small enough
// otherwise there will be no end to how large it will be!
int buffer_size_watermark = int(m_uploaded_last_second
int buffer_size_watermark = int(boost::int64_t(m_uploaded_last_second)
* m_settings.get_int(settings_pack::send_buffer_watermark_factor) / 100);
if (buffer_size_watermark < m_settings.get_int(settings_pack::send_buffer_low_watermark))