1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-16 20:36:35 +01:00

use correct types

This commit is contained in:
Jfreegman
2014-04-01 03:53:12 -04:00
parent f3a8ba6ab3
commit e419299487
4 changed files with 12 additions and 19 deletions

View File

@@ -162,7 +162,7 @@ static void groupchat_onGroupMessage(ToxWindow *self, Tox *m, int groupnum, int
ChatContext *ctx = self->chatwin;
uint8_t nick[TOX_MAX_NAME_LENGTH] = {'\0'};
uint16_t n_len = tox_group_peername(m, groupnum, peernum, nick);
int n_len = tox_group_peername(m, groupnum, peernum, nick);
n_len = MIN(n_len, TOXIC_MAX_NAME_LENGTH); /* enforce client max name length */
nick[n_len] = '\0';
@@ -172,8 +172,8 @@ static void groupchat_onGroupMessage(ToxWindow *self, Tox *m, int groupnum, int
bool beep = false;
uint8_t selfnick[TOX_MAX_NAME_LENGTH];
n_len = tox_get_self_name(m, selfnick);
selfnick[n_len] = '\0';
uint16_t sn_len = tox_get_self_name(m, selfnick);
selfnick[sn_len] = '\0';
int nick_clr = strcmp(nick, selfnick) == 0 ? GREEN : CYAN;