fix out of range

Co-authored-by: Mark <56205165+gamblor21@users.noreply.github.com>
This commit is contained in:
foamyguy 2022-11-27 17:02:55 -06:00 committed by GitHub
parent c6ca2bdd59
commit 3419b118fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@
static void pixelmap_set_pixel_rgbw(pixelmap_pixelmap_obj_t *self, size_t i, color_u rgbw) { static void pixelmap_set_pixel_rgbw(pixelmap_pixelmap_obj_t *self, size_t i, color_u rgbw) {
mp_arg_validate_index_range(i, 0, self->len, MP_QSTR_index); mp_arg_validate_index_range(i, 0, self->len - 1, MP_QSTR_index);
mp_obj_t item = self->items[i]; mp_obj_t item = self->items[i];
if (mp_obj_is_small_int(item)) { if (mp_obj_is_small_int(item)) {