diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2022-01-19 17:22:31 -0500 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2022-01-19 17:22:31 -0500 |
commit | 3efdcd78a1fd470ca47fdd30c3251170d2f4f03b (patch) | |
tree | 91a4236c012cc4782635029cf0e017dc485dc0c8 /watch-library | |
parent | c012a65ea225d24fa3e53b9f5e6acc8ce8c663ac (diff) | |
download | Sensor-Watch-3efdcd78a1fd470ca47fdd30c3251170d2f4f03b.tar.gz Sensor-Watch-3efdcd78a1fd470ca47fdd30c3251170d2f4f03b.tar.bz2 Sensor-Watch-3efdcd78a1fd470ca47fdd30c3251170d2f4f03b.zip |
fix out of bounds access when position != 0
Diffstat (limited to 'watch-library')
-rw-r--r-- | watch-library/watch/watch_slcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |