summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-02-12 19:17:10 -0500
committerGitHub <noreply@github.com>2019-02-12 19:17:10 -0500
commit66b0c67f54e76171b974a881776f9c3c2f30c5e7 (patch)
tree5a7735d4b9eaa0bf996aed3dea64af0bdffd39d8
parenta61f68f0fe8fa38a7a843bdd54bde15a75fcecef (diff)
parent4fbbb999b99e6879163a2a496014a396a50ddb30 (diff)
Merge pull request #1536 from TG-Techie/patch-4
DISPIO: end_x can't be > height of shape
-rw-r--r--shared-module/displayio/Shape.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-module/displayio/Shape.c b/shared-module/displayio/Shape.c
index 2ae955a14..ab9ca735b 100644
--- a/shared-module/displayio/Shape.c
+++ b/shared-module/displayio/Shape.c
@@ -59,7 +59,7 @@ void common_hal_displayio_shape_set_boundary(displayio_shape_t *self, uint16_t y
if (y < 0 || y >= self->height || (self->mirror_y && y > self->half_height)) {
mp_raise_ValueError(translate("y value out of bounds"));
}
- if (start_x < 0 || start_x > self->width || end_x < 0 || end_x > self->height) {
+ if (start_x < 0 || start_x > self->width || end_x < 0 || end_x > self->width) {
mp_raise_ValueError(translate("x value out of bounds"));
}
uint16_t half_width = self->width / 2 - 1 + self->width % 2;