Skip to content

Commit df4c028

Browse files
committed
_pixelbuf: error check in brightness setter (fix adafruit#3753)
1 parent d0bc5e4 commit df4c028

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)