Skip to content

Commit

Permalink
fix(color) overflow with 16 bit color depth
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Jun 20, 2021
1 parent 145a0fa commit fe6d8d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc/lv_color.c
Expand Up @@ -43,7 +43,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_color_fill(lv_color_t * buf, lv_color_t color, uin
px_num--;
}

uint32_t c32 = color.full + (color.full << 16);
uint32_t c32 = (uint32_t)color.full + ((uint32_t)color.full << 16);
uint32_t * buf32 = (uint32_t *)buf;

while(px_num > 16) {
Expand Down

0 comments on commit fe6d8d7

Please sign in to comment.