summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index 4841cbd9..eaf87179 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -2648,10 +2648,9 @@ uint32_t messenger_size(const Messenger *m)
2648 2648
2649static uint8_t *z_state_save_subheader(uint8_t *data, uint32_t len, uint16_t type) 2649static uint8_t *z_state_save_subheader(uint8_t *data, uint32_t len, uint16_t type)
2650{ 2650{
2651 memcpy(data, &len, sizeof(uint32_t)); 2651 host_to_lendian32(data, len);
2652 data += sizeof(uint32_t); 2652 data += sizeof(uint32_t);
2653 uint32_t temp = (MESSENGER_STATE_COOKIE_TYPE << 16) | type; 2653 host_to_lendian32(data, (host_tolendian16(MESSENGER_STATE_COOKIE_TYPE) << 16) | host_tolendian16(type));
2654 memcpy(data, &temp, sizeof(uint32_t));
2655 data += sizeof(uint32_t); 2654 data += sizeof(uint32_t);
2656 return data; 2655 return data;
2657} 2656}