Correct out of bounds array read

Corrects out of bounds array read in waterfall display.
This commit is contained in:
Allan Bazinet 2025-07-15 14:13:18 -07:00 committed by Jordan Sherer
parent cb6292ff4e
commit da31b024c2

View file

@ -661,7 +661,9 @@ CPlotter::replot()
else if constexpr (std::is_same_v<T, WF::SWide>)
{
for (auto x = 0; x < width; ++x)
auto const end = std::min(width, static_cast<int>(v.size()));
for (auto x = 0; x < end; ++x)
{
p.setPen(colors[scaler(v[x])]);
p.drawPoint(x, y);