From 73184638615c27a4e190c6a902a2f29729ee45ff Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 8 Feb 2023 22:07:36 +0100 Subject: Fix out of bounds error in drawing of vertical lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- lines.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lines.c b/lines.c index d43c7fe..4ac624a 100644 --- a/lines.c +++ b/lines.c @@ -50,6 +50,8 @@ draw_vertical_line(RASTER *restrict raster, double x1, double y1, double y2, int start = (size_t)y1; end = (size_t)y2; + start -= (size_t)(start == raster->height); + end -= (size_t)(end == raster->height); y = start; if (ydir > 0) { -- cgit v1.2.3-70-g09d2