]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix buffer check
authorToni Wilen <twilen@winuae.net>
Sun, 26 Oct 2025 14:29:53 +0000 (16:29 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 26 Oct 2025 14:29:53 +0000 (16:29 +0200)
drawing.cpp

index 0a8052964b0850ce85acd282a2fc0638d3d827d6..9a365eedab58501a56c5c5412ad48de4fc1c881a 100644 (file)
@@ -5534,10 +5534,10 @@ static void edgeblanking(int hbstrt_offset, int hbstop_offset, int internal_pixe
        int rshift = hresolution_inv;
        int hbstrt_offset2 = (hbstrt_offset - internal_pixel_start_cnt) >> rshift;
        int hbstop_offset2 = (hbstop_offset - internal_pixel_start_cnt) >> rshift;
-       uae_u32 *hbstrt_ptr1 = hbstrt_offset2 >= 0 ? buf1t + hbstrt_offset2 : NULL;
-       uae_u32 *hbstop_ptr1 = hbstop_offset2 >= 0 ? buf1t + hbstop_offset2 : NULL;
-       uae_u32 *hbstrt_ptr2 = buf2 && hbstrt_offset2 >= 0 ? buf2t + hbstrt_offset2 : NULL;
-       uae_u32 *hbstop_ptr2 = buf2 && hbstop_offset2 >= 0 ? buf2t + hbstop_offset2 : NULL;
+       uae_u32 *hbstrt_ptr1 = buf1t && hbstrt_offset2 >= 0 ? buf1t + hbstrt_offset2 : NULL;
+       uae_u32 *hbstop_ptr1 = buf1t && hbstop_offset2 >= 0 ? buf1t + hbstop_offset2 : NULL;
+       uae_u32 *hbstrt_ptr2 = buf2t && hbstrt_offset2 >= 0 ? buf2t + hbstrt_offset2 : NULL;
+       uae_u32 *hbstop_ptr2 = buf2t && hbstop_offset2 >= 0 ? buf2t + hbstop_offset2 : NULL;
        // blank last pixel row if normal overscan mode, it might have NTSC artifacts
        if (strlong_seen && hbstrt_ptr1) {
                int add = 1 << hresolution;