diff --git a/src/lv_font/lv_font_fmt_txt.c b/src/lv_font/lv_font_fmt_txt.c index 0e7f024ae..345666f93 100644 --- a/src/lv_font/lv_font_fmt_txt.c +++ b/src/lv_font/lv_font_fmt_txt.c @@ -114,7 +114,7 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; /*Check the chacge first*/ - if(letter == fdsc->last_letter) fdsc->last_glyph_id; + if(letter == fdsc->last_letter) return fdsc->last_glyph_id; uint16_t i; for(i = 0; i < fdsc->cmap_num; i++) {