1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-21 21:33:54 +00:00

Merge pull request #1413 from TomHarte/ShakerScanTarget

Avoid taking an out-of-range pointer.
This commit is contained in:
Thomas Harte 2024-10-19 10:15:30 -04:00 committed by GitHub
commit f00e7c4a80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,7 +76,7 @@ struct ScanTarget: public Outputs::Display::ScanTarget {
x_ = 0; x_ = 0;
} break; } break;
case Event::EndVerticalRetrace: 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; line_ = 0;
x_ = 0; x_ = 0;
break; break;