From 3efdcd78a1fd470ca47fdd30c3251170d2f4f03b Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Wed, 19 Jan 2022 17:22:31 -0500 Subject: fix out of bounds access when position != 0 --- watch-library/watch/watch_slcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'watch-library') diff --git a/watch-library/watch/watch_slcd.c b/watch-library/watch/watch_slcd.c index 4bcb1652..1b1e53e4 100644 --- a/watch-library/watch/watch_slcd.c +++ b/watch-library/watch/watch_slcd.c @@ -236,7 +236,7 @@ void watch_display_string(char *string, uint8_t position) { while(string[i] != 0) { watch_display_character(string[i], position + i); i++; - if (i >= Num_Chars) break; + if (position + i >= Num_Chars) break; } // uncomment this line to see screen output on terminal, i.e. // FR 29 -- cgit v1.2.3