From: joeycastillo Date: Sun, 6 Oct 2024 15:28:28 +0000 (-0400) Subject: avoid running over into position 10 X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=d0af20b4de3c1c4033d12993e3f3943370214a9f;p=sensor-watch.git avoid running over into position 10 --- diff --git a/watch-library/shared/watch/watch_common_display.c b/watch-library/shared/watch/watch_common_display.c index baf0fde..96b9032 100644 --- a/watch-library/shared/watch/watch_common_display.c +++ b/watch-library/shared/watch/watch_common_display.c @@ -249,6 +249,7 @@ void watch_display_text_with_fallback(watch_position_t location, const char *str i++; } while (string[i] != 0) { + if (4 + i - offset == 10) break; watch_display_character(string[i], 4 + i - offset); i++; }