From e6c42b7fa66112aae48a9159fbece92845e09102 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 14 Oct 2021 23:37:26 +0200 Subject: [PATCH] fix(core/ui): fix off-by-one in in_area --- core/src/trezor/ui/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/trezor/ui/__init__.py b/core/src/trezor/ui/__init__.py index d9d52f5c8a..d01fc0377c 100644 --- a/core/src/trezor/ui/__init__.py +++ b/core/src/trezor/ui/__init__.py @@ -209,7 +209,7 @@ def grid( def in_area(area: Area, x: int, y: int) -> bool: ax, ay, aw, ah = area - return ax <= x <= ax + aw and ay <= y <= ay + ah + return ax <= x < ax + aw and ay <= y < ay + ah # Component events. Should be different from `io.TOUCH_*` events.