1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-05 20:26:46 +02:00
This commit is contained in:
Jfreegman
2014-10-03 19:29:12 -04:00
parent 40f70fc1e3
commit 5c66f5c161
2 changed files with 9 additions and 6 deletions

View File

@ -250,7 +250,7 @@ void str_to_lower(char *str)
int get_nick_truncate(Tox *m, char *buf, int friendnum)
{
int len = tox_get_name(m, friendnum, (uint8_t *) buf);
len = MIN(len, TOXIC_MAX_NAME_LENGTH);
len = MIN(len, TOXIC_MAX_NAME_LENGTH - 1);
buf[len] = '\0';
return len;
}