Fix ui printing full name even though it is too long

This commit is contained in:
Night Kaly 2024-09-25 11:03:46 +01:00
parent 318b447cb9
commit 70df6b6dfa
Signed by: night0721
GPG key ID: 957D67B8DB7A119B

View file

@ -230,7 +230,7 @@ void draw_users()
char line[name_len]; char line[name_len];
if (too_long) { if (too_long) {
strncpy(line, seluser.name, name_len - 2); strncpy(line, seluser.name, (MAX_NAME / 2) - 2);
strncat(line, "..", 2); strncat(line, "..", 2);
} else { } else {
strcpy(line, seluser.name); strcpy(line, seluser.name);