From 8347203dc642de523bf4bbaafd357c7b7c8e8a70 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Fri, 1 Dec 2023 02:06:51 -0500 Subject: [BugFix] scroll_stop_viewport_rect off by 1 when you do the math yes there are 8 slots between y = 16 and h = 8 and y = 24 16 17 18 19 20 21 22 23 1 2 3 4 5 6 7 8 but 16 + 8 = 24 ah an off by 1 error Change-Id: I7b0625da1351910b27e5526c0a9f969c067758c6 --- firmware/drivers/lcd-scroll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/drivers/lcd-scroll.c') diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index cd8fc4587e..26b15732cd 100644 --- a/firmware/drivers/lcd-scroll.c +++ b/firmware/drivers/lcd-scroll.c @@ -64,8 +64,8 @@ void LCDFN(scroll_stop_viewport_rect)(const struct viewport *vp, int x, int y, i struct scrollinfo *s = &LCDFN(scroll_info).scroll[i]; /* check if the specified area crosses the viewport in some way */ if (s->vp == vp - && (x < (s->x+s->width) && (x+width) >= s->x) - && (y < (s->y+s->height) && (y+height) >= s->y)) + && (x < (s->x+s->width) && (x+width) > s->x) + && (y < (s->y+s->height) && (y+height) > s->y)) { /* inform scroller about end of scrolling */ s->line = NULL; -- cgit v1.2.3