1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Don't allow speed plot buffer to overflow

This commit is contained in:
Vladimir Golovnev (Glassez) 2021-03-09 19:52:10 +03:00
parent 0bf36ad031
commit 20e9952d98
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7

View File

@ -137,7 +137,7 @@ bool SpeedPlotView::Averager::push(const SampleData &sampleData)
// once we go above the max duration never go below that
// otherwise it will cause empty space in graphs
while (!m_sink.empty()
&& ((m_currentDuration - m_sink.front().duration) > m_maxDuration))
&& ((m_currentDuration - m_sink.front().duration) >= m_maxDuration))
{
m_currentDuration -= m_sink.front().duration;
m_sink.pop_front();