From 49c811b5f52b971aae590eea9ebc0559d8645932 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 19 Oct 2024 10:12:51 -0400 Subject: [PATCH] Avoid taking an out-of-range pointer. (Even though it was safe) --- OSBindings/Mac/Clock SignalTests/CPCShakerTests.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSBindings/Mac/Clock SignalTests/CPCShakerTests.mm b/OSBindings/Mac/Clock SignalTests/CPCShakerTests.mm index 06e0283d9..ad3cf1eab 100644 --- a/OSBindings/Mac/Clock SignalTests/CPCShakerTests.mm +++ b/OSBindings/Mac/Clock SignalTests/CPCShakerTests.mm @@ -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;