1
0
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:
Jfreegman
2014-04-01 04:43:52 -04:00
parent e419299487
commit 411ae8d0f5
5 changed files with 15 additions and 16 deletions

View File

@ -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);