Skip to content

Commit 3419b11

Browse files
FoamyGuygamblor21
andauthored
fix out of range
Co-authored-by: Mark <[email protected]>
1 parent c6ca2bd commit 3419b11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/_pixelmap/PixelMap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535

3636
static void pixelmap_set_pixel_rgbw(pixelmap_pixelmap_obj_t *self, size_t i, color_u rgbw) {
37-
mp_arg_validate_index_range(i, 0, self->len, MP_QSTR_index);
37+
mp_arg_validate_index_range(i, 0, self->len - 1, MP_QSTR_index);
3838

3939
mp_obj_t item = self->items[i];
4040
if (mp_obj_is_small_int(item)) {

0 commit comments

Comments
 (0)