summaryrefslogtreecommitdiff
path: root/testing/toxic/chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/toxic/chat.c')
-rw-r--r--testing/toxic/chat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c
index 28c5de6c..56dfb050 100644
--- a/testing/toxic/chat.c
+++ b/testing/toxic/chat.c
@@ -16,7 +16,7 @@
16 16
17typedef struct { 17typedef struct {
18 int friendnum; 18 int friendnum;
19 char line[256]; 19 char line[MAX_STR_SIZE];
20 size_t pos; 20 size_t pos;
21 WINDOW* history; 21 WINDOW* history;
22 WINDOW* linewin; 22 WINDOW* linewin;
@@ -178,9 +178,9 @@ void execute(ToxWindow *self, ChatContext *ctx, char *cmd)
178 } 178 }
179 179
180 else if (!strcmp(cmd, "/myid")) { 180 else if (!strcmp(cmd, "/myid")) {
181 char id[32*2 + 1] = {0}; 181 char id[KEY_SIZE_BYTES*2+1] = {0};
182 int i; 182 int i;
183 for (i = 0; i < 32; i++) { 183 for (i = 0; i < KEY_SIZE_BYTES; i++) {
184 char xx[3]; 184 char xx[3];
185 snprintf(xx, sizeof(xx), "%02x", self_public_key[i] & 0xff); 185 snprintf(xx, sizeof(xx), "%02x", self_public_key[i] & 0xff);
186 strcat(id, xx); 186 strcat(id, xx);