From eb614c32b3ac05e109c04c33253cb53d50518d63 Mon Sep 17 00:00:00 2001 From: Chris Chua Date: Wed, 4 Dec 2019 04:43:16 +1100 Subject: [PATCH] Also making \r break lines in labels --- src/lv_misc/lv_txt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index cee1564347be..5212976a1e28 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -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; }