From 56ecdee5a02e9dcfb95f1276c42771f296db8dc9 Mon Sep 17 00:00:00 2001 From: James Carr Date: Mon, 13 Sep 2021 19:50:35 +0100 Subject: [PATCH] Correct the 24bit decoding in bitmaptools.readinto() --- shared-module/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 2bb062239a..b6e0764fdb 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -591,7 +591,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f break; case 24: - value = (rowdata8[x * 3] << 16) | (rowdata8[x * 3 + 1] << 8) | (rowdata8[x * 3 + 2] << 8); + value = (rowdata8[x * 3] << 16) | (rowdata8[x * 3 + 1] << 8) | rowdata8[x * 3 + 2]; break; case 32: