1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

lv_txt_get_next_line: step at least one to avoid infinite loops

This commit is contained in:
Gabor Kiss-Vamosi 2019-07-24 06:07:20 +02:00
parent 28505b09e6
commit 5a9904fa12

View File

@ -306,6 +306,11 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
if(letter_next == '\0') i = tmp;
}
/*Always step at least one to avoid infinite loops*/
if(i == 0) {
lv_txt_encoded_next(txt, &i);
}
return i;
}