From e9a52a753c49ed50d25f2391b047fbd23dc06fd3 Mon Sep 17 00:00:00 2001 From: Jannis Rieger <omniskopus@gmail.com> Date: Wed, 28 Aug 2019 03:11:26 +0200 Subject: [PATCH] fix(gfx): rectangle_fill is one pixel to small --- lib/gfx/gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gfx/gfx.c b/lib/gfx/gfx.c index 5af5bbb3..49b8d3a8 100644 --- a/lib/gfx/gfx.c +++ b/lib/gfx/gfx.c @@ -174,8 +174,8 @@ void gfx_rectangle( void gfx_rectangle_fill( struct gfx_region *reg, int x, int y, int w, int h, Color c ) { - for (int y_ = y; y_ < y + h; y_++) { - for (int x_ = x; x_ < x + w; x_++) + for (int y_ = y; y_ <= y + h; y_++) { + for (int x_ = x; x_ <= x + w; x_++) gfx_setpixel(reg, x_, y_, c); } } -- GitLab