Skip to content

Commit 21446e5

Browse files
author
Nicole Faerber
committed
Limit Version_GetGitVersion() print to what can be actually displayed
1 parent 38f181c commit 21446e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ int main(void) {
118118
LCD_disp_str((uint8_t*)buf, len, 0, 64 - 6, FONT6X6);
119119
printf("\nRunning on an %s", buf);
120120

121-
len = snprintf(buf, sizeof(buf), "%s", Version_GetGitVersion());
121+
len = snprintf(buf, 21, "%s", Version_GetGitVersion());
122122
LCD_disp_str((uint8_t*)buf, len, 128 - (len * 6), 0, FONT6X6);
123123

124124
LCD_FB_Update();
@@ -348,7 +348,7 @@ static int32_t Main_Work(void) {
348348
len = snprintf(buf, sizeof(buf), "T-962 controller");
349349
LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), 0, FONT6X6);
350350

351-
len = snprintf(buf, sizeof(buf), "%s", Version_GetGitVersion());
351+
len = snprintf(buf, 21, "%s", Version_GetGitVersion());
352352
LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), 64 - 6, FONT6X6);
353353

354354
LCD_BMPDisplay(stopbmp, 127 - 17, 0);

0 commit comments

Comments
 (0)