From 767345a736791345c2645f11eacec38804105402 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Tue, 3 Nov 2026 13:10:22 +0100 Subject: [PATCH] Measure the HAM left border clear from its start pointer The fast-mode HAM left-border clear starts at buf1p, but its length was clamped with the advanced output cursor buf1. With full_line_draw (for example genlock) draw_blank_end() has already moved buf1 to xlinebuffer_end, so the clear was always skipped; otherwise it could be cut short by the unrelated space left at the right edge. Clamp against the remaining space from buf1p. --- drawing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drawing.cpp b/drawing.cpp index e44a00566..4c61fbdfc 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -7821,8 +7821,8 @@ void draw_denise_bitplane_line_fast(int gfx_ypos, enum nln_how how, struct lines hbstop_offset += ww1; int w = hbstop_offset - draw_startoffset - (1 << hresolution); if (w > 0) { - if (buf1 + w > (uae_u32*)xlinebuffer_end) { - w = addrdiff((uae_u32*)xlinebuffer_end, buf1); + if (buf1p + w > (uae_u32*)xlinebuffer_end) { + w = addrdiff((uae_u32*)xlinebuffer_end, buf1p); } if (w > 0) { memset(buf1p, DEBUG_TVOVERSCAN_H_GRAYSCALE_LEFT, w * sizeof(uae_u32));