mirror of
https://github.com/JS8Call-improved/JS8Call-improved
synced 2026-08-13 17:47:36 -04:00
Correct out of bounds array read
Corrects out of bounds array read in waterfall display.
This commit is contained in:
parent
cb6292ff4e
commit
da31b024c2
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue