mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-03 06:06:45 +02:00
off by 1 error
This commit is contained in:
@ -371,7 +371,7 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum
|
||||
|
||||
uint8_t nick[TOX_MAX_NAME_LENGTH];
|
||||
int n_len = tox_get_name(m, friendnum, nick);
|
||||
n_len = MIN(n_len, TOXIC_MAX_NAME_LENGTH);
|
||||
n_len = MIN(n_len, TOXIC_MAX_NAME_LENGTH-1);
|
||||
|
||||
if (!nick[0]) {
|
||||
snprintf(nick, sizeof(nick), "%s", UNKNOWN_NAME);
|
||||
|
Reference in New Issue
Block a user