1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 02:23:02 +01:00

small fix

This commit is contained in:
Jfreegman 2014-04-01 03:04:41 -04:00
parent 6d98f38128
commit f3a8ba6ab3
2 changed files with 5 additions and 5 deletions

View File

@ -349,10 +349,10 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int32_t friendnumber, ui
return;
uint8_t name[TOX_MAX_NAME_LENGTH];
uint8_t msg[MAX_STR_SIZE];
int n_len;
uint8_t msg[MAX_STR_SIZE + TOX_MAX_NAME_LENGTH];
uint16_t n_len = tox_get_name(m, friendnumber, name);
if (n_len = tox_get_name(m, friendnumber, name) == -1)
if (n_len == -1)
return;
n_len = MIN(n_len, TOXIC_MAX_NAME_LENGTH);

View File

@ -370,9 +370,9 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum
ChatContext *ctx = self->chatwin;
uint8_t nick[TOX_MAX_NAME_LENGTH];
uint16_t n_len;
uint16_t n_len = tox_get_name(m, friendnum, nick);
if (n_len = tox_get_name(m, friendnum, nick) == -1)
if (n_len == -1)
return;
n_len = MIN(n_len, TOXIC_MAX_NAME_LENGTH);