mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 14:53:26 +01:00
small fix
This commit is contained in:
parent
6d98f38128
commit
f3a8ba6ab3
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user