From 4055a0d5a78d73a3cd970d231b5bcc5712d98b1c Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 22 Jul 2023 18:37:02 +0200 Subject: [PATCH] tests/drivers/disp_dev: fix off by one in display area --- tests/drivers/disp_dev/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/drivers/disp_dev/main.c b/tests/drivers/disp_dev/main.c index 351181344b..9fcc11b9ea 100644 --- a/tests/drivers/disp_dev/main.c +++ b/tests/drivers/disp_dev/main.c @@ -70,9 +70,9 @@ int main(void) } area.x1 = ((max_width - RIOT_LOGO_WIDTH) >> 1); - area.x2 = ((max_width + RIOT_LOGO_WIDTH) >> 1); + area.x2 = ((max_width + RIOT_LOGO_WIDTH) >> 1) - 1; area.y1 = ((max_height - RIOT_LOGO_HEIGHT) >> 1); - area.y2 = ((max_height + RIOT_LOGO_HEIGHT) >> 1); + area.y2 = ((max_height + RIOT_LOGO_HEIGHT) >> 1) - 1; disp_dev_map(disp_dev->dev, &area, (const uint16_t *)picture); puts("SUCCESS");