From 8e23ce1b83b92bf9f99576e0d46e98500d9fdb47 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Wed, 22 Jul 2015 14:55:52 -0400 Subject: [PATCH] Group API changes --- src/group_commands.c | 4 ++-- src/groupchat.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/group_commands.c b/src/group_commands.c index c8013cc..6f719e8 100644 --- a/src/group_commands.c +++ b/src/group_commands.c @@ -135,7 +135,7 @@ void cmd_ban(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX return; } - uint16_t ban_list[num_banned]; + uint32_t ban_list[num_banned]; if (!tox_group_ban_get_list(m, self->num, ban_list, &err)) { line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to get the ban list (error %d).", err); @@ -145,7 +145,7 @@ void cmd_ban(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX uint16_t i; for (i = 0; i < num_banned; ++i) { - uint16_t id = ban_list[i]; + uint32_t id = ban_list[i]; size_t len = tox_group_ban_get_name_size(m, self->num, id, &err); if (err != TOX_ERR_GROUP_BAN_QUERY_OK) { diff --git a/src/groupchat.c b/src/groupchat.c index 6cc8991..3734620 100644 --- a/src/groupchat.c +++ b/src/groupchat.c @@ -538,8 +538,8 @@ static void groupchat_onGroupPeerlistUpdate(ToxWindow *self, Tox *m, uint32_t gr name_length = MIN(name_length, TOX_MAX_NAME_LENGTH - 1); if (!tox_group_peer_get_name(m, groupnum, i, (uint8_t *) chat->peer_list[i].name, NULL)) { - chat->peer_list[i].name_length = strlen(UNKNOWN_NAME); - memcpy(chat->peer_list[i].name, UNKNOWN_NAME, chat->peer_list[i].name_length); + name_length = strlen(UNKNOWN_NAME); + memcpy(chat->peer_list[i].name, UNKNOWN_NAME, name_length); } chat->peer_list[i].name[name_length] = '\0';