fixed calculation of messenger size (no spam was not accounted for)

This commit is contained in:
Michael Rose 2013-08-14 11:38:30 +02:00
parent bfa624139a
commit 08735b142f

View File

@ -751,7 +751,7 @@ void doMessenger(Messenger *m)
/* returns the size of the messenger data (for saving) */
uint32_t Messenger_size(Messenger *m)
{
return crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES
return crypto_box_PUBLICKEYBYTES + crypto_box_SECRETKEYBYTES + sizeof(uint32_t)
+ sizeof(uint32_t) + DHT_size() + sizeof(uint32_t) + sizeof(Friend) * m->numfriends;
}