Skip to content

Commit

Permalink
fix overflow on 16 bit MCU in font processing
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Jan 17, 2020
1 parent ca84aaf commit 33f5448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lv_font/lv_font_fmt_txt.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,5 +475,5 @@ static uint8_t rle_next(void)
*/
static int32_t unicode_list_compare(const void * ref, const void * element)
{
return (*(uint16_t *)ref) - (*(uint16_t *)element);
return ((int32_t)(*(uint16_t *)ref)) - ((int32_t)(*(uint16_t *)element));
}

0 comments on commit 33f5448

Please sign in to comment.