From e12288be3f3823e5e51c22adccd0ffbf74b7e944 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Wed, 26 Jul 2023 00:19:55 -0300 Subject: [PATCH] Move these two lines after calculating the slopes --- src/r_bbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_bbox.c b/src/r_bbox.c index 59d0893c4..4302d1b9a 100644 --- a/src/r_bbox.c +++ b/src/r_bbox.c @@ -129,9 +129,6 @@ draw_bbox_row x1 = a->x; x2 = b->x; - if (x2 >= viewwidth) - x2 = viewwidth - 1; - if (x1 == x2 || x1 >= viewwidth || x2 < 0) return; @@ -159,6 +156,9 @@ draw_bbox_row x1 = 0; } + if (x2 >= viewwidth) + x2 = viewwidth - 1; + while (x1 < x2) { raster_bbox_seg(x1, y1, s1, bb->color);