From 20e9952d9833648310b3add78fbd5ebe4ef24fb9 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Tue, 9 Mar 2021 19:52:10 +0300 Subject: [PATCH] Don't allow speed plot buffer to overflow --- src/gui/properties/speedplotview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/properties/speedplotview.cpp b/src/gui/properties/speedplotview.cpp index 3b9d341ac..d0ab84d19 100644 --- a/src/gui/properties/speedplotview.cpp +++ b/src/gui/properties/speedplotview.cpp @@ -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();