Skip to content

Commit 4fbbb99

Browse files
authored
DISPIO: end_x can't be > height of shape
an author must have forgotten to change from height to width after copy paste.
1 parent f34360b commit 4fbbb99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shared-module/displayio/Shape.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void common_hal_displayio_shape_set_boundary(displayio_shape_t *self, uint16_t y
5959
if (y < 0 || y >= self->height || (self->mirror_y && y > self->half_height)) {
6060
mp_raise_ValueError(translate("y value out of bounds"));
6161
}
62-
if (start_x < 0 || start_x > self->width || end_x < 0 || end_x > self->height) {
62+
if (start_x < 0 || start_x > self->width || end_x < 0 || end_x > self->width) {
6363
mp_raise_ValueError(translate("x value out of bounds"));
6464
}
6565
uint16_t half_width = self->width / 2 - 1 + self->width % 2;

0 commit comments

Comments
 (0)