From ed8e4dd9efb701eb2895ee3482dfa60c72857164 Mon Sep 17 00:00:00 2001 From: Markus Ransberger Date: Fri, 29 Sep 2023 01:02:45 +0200 Subject: [PATCH] Minor formatting fixes. --- src/matrix/render_functions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/matrix/render_functions.cpp b/src/matrix/render_functions.cpp index c58d478..1a6ba29 100644 --- a/src/matrix/render_functions.cpp +++ b/src/matrix/render_functions.cpp @@ -169,7 +169,7 @@ String time_to_string(uint8_t hours, uint8_t minutes) { hours++; } - if (hours > 12) // 24h -> 12h, except 12h + if (hours > 12) // 24h -> 12h, except 12h { hours -= 12; } @@ -251,6 +251,7 @@ String split(String s, char parser, int index) String rs = ""; int parser_cnt = 0; int r_from_index = 0, r_to_index = -1; + while (index >= parser_cnt) { r_from_index = r_to_index + 1; @@ -264,7 +265,9 @@ String split(String s, char parser, int index) return s.substring(r_from_index, r_to_index); } else + { parser_cnt++; + } } return rs; }