mirror of
https://github.com/troglobit/finit.git
synced 2026-11-13 17:00:16 +00:00
Account for 3-4 byte wide unicode characters in heading
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
880ad98dbe
commit
85fe613b30
1 file changed
+1
-1
+1
-1
@@ -131,7 +131,7 @@ static char *pad(char *buf, size_t len, char *ch, size_t width)
|
|||||||
|
|
||||||
void print_banner(const char *heading)
|
void print_banner(const char *heading)
|
||||||
{
|
{
|
||||||
char buf[SCREEN_WIDTH + 10];
|
char buf[4 * SCREEN_WIDTH];
|
||||||
|
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
strlcat(buf, "\r\e[2K", sizeof(buf));
|
strlcat(buf, "\r\e[2K", sizeof(buf));
|
||||||
|
|||||||
Reference in new issue
Block a user