summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorDan Halbert <halbert@adafruit.com>2021-01-01 22:03:45 -0500
committerGitHub <noreply@github.com>2021-01-01 22:03:45 -0500
commitad2ee0954c34765b5f03aca856e7edff0b8c8df6 (patch)
tree782e51e6761f8c50586bb9130accaba053569961 /shared-bindings
parentd0bc5e4e5737f330d87177cd4c88507a176e2c87 (diff)
parentdf4c028d29e5a48180975d17471db81dc4717442 (diff)
Merge pull request #3917 from brrzap/fix-3753
pixelbuf: error check in brightness setter
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/_pixelbuf/PixelBuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-bindings/_pixelbuf/PixelBuf.c b/shared-bindings/_pixelbuf/PixelBuf.c
index 88e8aa801..a4b5b5b1b 100644
--- a/shared-bindings/_pixelbuf/PixelBuf.c
+++ b/shared-bindings/_pixelbuf/PixelBuf.c
@@ -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) {