From 70df6b6dfa3211b2344546b59e83a8e87e439514 Mon Sep 17 00:00:00 2001 From: night0721 Date: Wed, 25 Sep 2024 11:03:46 +0100 Subject: [PATCH] Fix ui printing full name even though it is too long --- src/zen/ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zen/ui.c b/src/zen/ui.c index ba75cb4..b93a3de 100644 --- a/src/zen/ui.c +++ b/src/zen/ui.c @@ -230,7 +230,7 @@ void draw_users() char line[name_len]; if (too_long) { - strncpy(line, seluser.name, name_len - 2); + strncpy(line, seluser.name, (MAX_NAME / 2) - 2); strncat(line, "..", 2); } else { strcpy(line, seluser.name);