summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c1
-rw-r--r--util.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 6d4ea36..8cef6ce 100644
--- a/main.c
+++ b/main.c
@@ -643,6 +643,7 @@ void accept_friend_request(Tox *tox, const uint8_t *public_key, const uint8_t *d
643 643
644 friendnumber = tox_add_friend_norequest(tox, public_key); 644 friendnumber = tox_add_friend_norequest(tox, public_key);
645 645
646 memset(tox_printable_id, '\0', sizeof(tox_printable_id));
646 id_to_string(tox_printable_id, public_key); 647 id_to_string(tox_printable_id, public_key);
647 printf("Accepted friend request from %s as %d\n", tox_printable_id, friendnumber); 648 printf("Accepted friend request from %s as %d\n", tox_printable_id, friendnumber);
648 649
diff --git a/util.c b/util.c
index 8391279..86d316d 100644
--- a/util.c
+++ b/util.c
@@ -43,7 +43,7 @@ void to_hex(char_t *a, const char_t *p, int size)
43/* From utox/util.c */ 43/* From utox/util.c */
44void id_to_string(char_t *dest, const char_t *src) 44void id_to_string(char_t *dest, const char_t *src)
45{ 45{
46 to_hex(dest, src, TOX_FRIEND_ADDRESS_SIZE - 1); 46 to_hex(dest, src, TOX_FRIEND_ADDRESS_SIZE);
47} 47}
48 48
49/* From utox/util.c */ 49/* From utox/util.c */