Account for 3-4 byte wide unicode characters in heading

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2020-01-05 16:10:41 +01:00
parent 880ad98dbe
commit 85fe613b30
+1 -1
View File
@@ -131,7 +131,7 @@ static char *pad(char *buf, size_t len, char *ch, size_t width)
void print_banner(const char *heading)
{
char buf[SCREEN_WIDTH + 10];
char buf[4 * SCREEN_WIDTH];
memset(buf, 0, sizeof(buf));
strlcat(buf, "\r\e[2K", sizeof(buf));