mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
Improved guard of right edge iterator in linear chart view for stats.
This commit is contained in:
parent
7f2bba7c4a
commit
85b0733169
1 changed files with 3 additions and 0 deletions
|
@ -204,6 +204,9 @@ int LinearChartView::findXIndexByPosition(
|
|||
: ((*nearest) < xPercentageLimits.min)
|
||||
? (nearest + 1)
|
||||
: nearest;
|
||||
if (resultXPercentageIt == end(chartData.xPercentage)) {
|
||||
return chartData.xPercentage.size() - 1;
|
||||
}
|
||||
return std::distance(begin(chartData.xPercentage), resultXPercentageIt);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue