From e1027353ab4ac0168ac76738cd0b2652b64b23fb Mon Sep 17 00:00:00 2001 From: Graeme Winter Date: Thu, 8 Apr 2021 08:16:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=94=20=20original=20comparison=20did?= =?UTF-8?q?=20not=20work...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- micropython/modules/pico_scroll/pico_scroll.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/micropython/modules/pico_scroll/pico_scroll.cpp b/micropython/modules/pico_scroll/pico_scroll.cpp index 5112b15a..a193398e 100644 --- a/micropython/modules/pico_scroll/pico_scroll.cpp +++ b/micropython/modules/pico_scroll/pico_scroll.cpp @@ -95,7 +95,8 @@ mp_obj_t picoscroll_show_bitmap_1d(mp_obj_t bitmap_obj, mp_obj_t brightness_obj, int height = PicoScroll::HEIGHT; // this obviously shouldn't happen as the scroll is 17x7 pixels - if (height > (int) sizeof(unsigned char)) { + // would fall off end of byte if this the case + if (height > 8) { mp_raise_msg(&mp_type_RuntimeError, INCORRECT_SIZE_MSG); }