From a89bc0fe9ca81421a592171d10287ae69fd5910b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 4 Jan 2022 02:01:30 +0000 Subject: [PATCH] Fix fringe bitmap display on haiku again * src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix off-by-one errors. --- src/haiku_draw_support.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/haiku_draw_support.cc b/src/haiku_draw_support.cc index b0bc786ccfa..76a5d2e59c7 100644 --- a/src/haiku_draw_support.cc +++ b/src/haiku_draw_support.cc @@ -310,9 +310,9 @@ BView_DrawBitmapWithEraseOp (void *view, void *bitmap, int x, if (bm->ColorSpace () == B_GRAY1) { rgb_color low_color = vw->LowColor (); - for (int y = 0; y <= bc.Bounds ().Height () + 1; ++y) + for (int y = 0; y <= bc.Bounds ().Height (); ++y) { - for (int x = 0; x <= bc.Bounds ().Width () + 1; ++x) + for (int x = 0; x <= bc.Bounds ().Width (); ++x) { if (bits[y * (stride / 4) + x] == 0xFF000000) bits[y * (stride / 4) + x] = RGB_COLOR_UINT32 (low_color); -- 2.39.2