Skip to content

Commit e7f82ec

Browse files
schodetdlech
authored andcommitted
pybricks.parameters.Image: fix Image.empty initial content
Fix a regression introduced in 2a15f72 in which a new empty image is no longer cleared on creation.
1 parent 56e57d5 commit e7f82ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pybricks/parameters/pb_type_image.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ static mp_obj_t pb_type_Image_empty(size_t n_args, const mp_obj_t *pos_args, mp_
137137
self->owner = MP_OBJ_NULL;
138138
self->is_display = false;
139139
pbio_image_init(&self->image, buf, width, height, width);
140+
pbio_image_fill(&self->image, 0);
140141

141142
return MP_OBJ_FROM_PTR(self);
142143
}

0 commit comments

Comments
 (0)