1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-26 08:29:33 +00:00

Avoid taking an out-of-range pointer.

(Even though it was safe)
This commit is contained in:
Thomas Harte 2024-10-19 10:12:51 -04:00
parent b6c21e071d
commit 49c811b5f5

View File

@ -76,7 +76,7 @@ struct ScanTarget: public Outputs::Display::ScanTarget {
x_ = 0;
} break;
case Event::EndVerticalRetrace:
std::fill(&raw_image_[line_ * ImageWidth], &raw_image_[ImageHeight * ImageWidth], 0);
std::fill(raw_image_.begin() + (line_ * ImageWidth), raw_image_.end(), 0);
line_ = 0;
x_ = 0;
break;