1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-08 09:16:45 +02:00

fix magic numbers

This commit is contained in:
Jfreegman
2013-08-08 04:51:58 -04:00
parent 90acd2dfef
commit 297ee1ecaa
4 changed files with 19 additions and 17 deletions

6
chat.c
View File

@ -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);