Merge pull request #3917 from brrzap/fix-3753

pixelbuf: error check in brightness setter
This commit is contained in:
Dan Halbert 2021-01-01 22:03:45 -05:00 committed by GitHub
commit ad2ee0954c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,7 +185,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_brightness_obj, pixelbuf_pixelbu
STATIC mp_obj_t pixelbuf_pixelbuf_obj_set_brightness(mp_obj_t self_in, mp_obj_t value) {
mp_float_t brightness = mp_obj_float_get(value);
mp_float_t brightness = mp_obj_get_float(value);
if (brightness > 1) {
brightness = 1;
} else if (brightness < 0) {