Fix LCD clipped center text

Fix LCD clipped center text (#5193)
This commit is contained in:
Theo Arends 2019-02-11 15:43:02 +01:00
parent 1bd3bcc9be
commit 7146b5fd4d
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ void LcdCenter(uint8_t row, char* txt)
line[Settings.display_cols[0]] = 0;
len = strlen(txt);
offset = (len < Settings.display_cols[0]) ? offset = (Settings.display_cols[0] - len) / 2 : 0;
strlcpy(line +offset, txt, len);
strlcpy(line +offset, txt, len +1);
lcd->setCursor(0, row);
lcd->print(line);
}