Skip to content

Commit

Permalink
Also making \r break lines in labels
Browse files Browse the repository at this point in the history
  • Loading branch information
someone42 committed Dec 3, 2019
1 parent 4037a68 commit eb614c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lv_misc/lv_txt.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,

i += advance;

if(txt[0] == '\n') break;
if(txt[0] == '\n' || txt[0] == '\r') break;

if(txt[i] == '\n'){
if(txt[i] == '\n' || txt[i] == '\r'){
i++; /* Include the following newline in the current line */
break;
}
Expand Down

0 comments on commit eb614c3

Please sign in to comment.