From 10f56279127816f0cb07872283ea0ce36ad1c700 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Wed, 25 Sep 2013 00:38:39 -0400 Subject: [PATCH] fixed groupchat join but --- src/commands.c | 2 +- src/prompt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.c b/src/commands.c index a2c7db1..bc47b91 100644 --- a/src/commands.c +++ b/src/commands.c @@ -259,7 +259,7 @@ void cmd_join(WINDOW *window, ToxWindow *prompt, Tox *m, int argc, char **argv) uint8_t *groupkey = pending_grp_requests[num]; - if (strlen(groupkey) != TOX_CLIENT_ID_SIZE) { /* Improve this test */ + if (!strlen(groupkey)) { wprintw(window, "No pending group chat invite with that number.\n"); return; } diff --git a/src/prompt.c b/src/prompt.c index 9c9ddc3..6d11422 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -19,7 +19,7 @@ uint8_t num_frnd_requests = 0; /* One group chat request slot for each friend; slot is overwritten on subsequent requests by the same friend. */ -uint8_t pending_grp_requests[MAX_FRIENDS_NUM][TOX_CLIENT_ID_SIZE]; +uint8_t pending_grp_requests[MAX_FRIENDS_NUM][TOX_CLIENT_ID_SIZE] = {'\0'}; static char prompt_buf[MAX_STR_SIZE] = {'\0'}; static int prompt_buf_pos = 0;