summaryrefslogtreecommitdiffstats
path: root/firmware/drivers/lcd-bitmap-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-bitmap-common.c')
-rw-r--r--firmware/drivers/lcd-bitmap-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index bb98ceed8a..4a94aff412 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -77,7 +77,7 @@ static inline bool clip_viewport_pixel(struct viewport *vp, int *x, int *y)
static inline bool clip_viewport_hline(struct viewport *vp,
int *x1, int *x2, int *y)
{
- if (*y < 0 || *y > vp->height)
+ if (*y < 0 || *y >= vp->height)
return false;
if (*x2 < *x1) {
@@ -105,7 +105,7 @@ static inline bool clip_viewport_hline(struct viewport *vp,
static inline bool clip_viewport_vline(struct viewport *vp,
int *x, int *y1, int *y2)
{
- if (*x < 0 || *x > vp->width)
+ if (*x < 0 || *x >= vp->width)
return false;
if (*y2 < *y1) {