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:
parent
28505b09e6
commit
5a9904fa12
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user