Skip to content

Commit ad2ee09

Browse files
authored
Merge pull request #3917 from brrzap/fix-3753
pixelbuf: error check in brightness setter
2 parents d0bc5e4 + df4c028 commit ad2ee09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-bindings/_pixelbuf/PixelBuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_brightness_obj, pixelbuf_pixelbu
185185

186186

187187
STATIC mp_obj_t pixelbuf_pixelbuf_obj_set_brightness(mp_obj_t self_in, mp_obj_t value) {
188-
mp_float_t brightness = mp_obj_float_get(value);
188+
mp_float_t brightness = mp_obj_get_float(value);
189189
if (brightness > 1) {
190190
brightness = 1;
191191
} else if (brightness < 0) {

0 commit comments

Comments
 (0)