From 6f98fc47b02d70c2e2eb50d4bdc942286950cda5 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Thu, 8 Aug 2013 04:51:58 -0400 Subject: fix magic numbers --- testing/toxic/chat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testing/toxic/chat.c') 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 @@ typedef struct { int friendnum; - char line[256]; + char line[MAX_STR_SIZE]; size_t pos; WINDOW* history; WINDOW* linewin; @@ -178,9 +178,9 @@ void execute(ToxWindow *self, ChatContext *ctx, char *cmd) } else if (!strcmp(cmd, "/myid")) { - char id[32*2 + 1] = {0}; + char id[KEY_SIZE_BYTES*2+1] = {0}; int i; - for (i = 0; i < 32; i++) { + for (i = 0; i < KEY_SIZE_BYTES; i++) { char xx[3]; snprintf(xx, sizeof(xx), "%02x", self_public_key[i] & 0xff); strcat(id, xx); -- cgit v1.2.3