From cb9b8fc7cdb03b7f6fa3b4b57818af8cf3203da5 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 13 Mar 2014 15:10:59 -0400 Subject: [PATCH] Fixed bug, unconfirmed friends now load correctly. --- toxcore/Messenger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index f4e497d0..9d5fe22a 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -2416,7 +2416,7 @@ static int friends_list_load(Messenger *m, uint8_t *data, uint32_t length) memcpy(address + crypto_box_PUBLICKEYBYTES, &(temp.friendrequest_nospam), sizeof(uint32_t)); uint16_t checksum = address_checksum(address, FRIEND_ADDRESS_SIZE - sizeof(checksum)); memcpy(address + crypto_box_PUBLICKEYBYTES + sizeof(uint32_t), &checksum, sizeof(checksum)); - m_addfriend(m, address, temp.info, temp.info_size); + m_addfriend(m, address, temp.info, ntohs(temp.info_size)); } }