summaryrefslogtreecommitdiff
path: root/toxcore/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/network.c')
-rw-r--r--toxcore/network.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index e5a58331..c448cb7e 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -1532,7 +1532,8 @@ size_t net_unpack_u16(const uint8_t *bytes, uint16_t *v)
1532size_t net_unpack_u32(const uint8_t *bytes, uint32_t *v) 1532size_t net_unpack_u32(const uint8_t *bytes, uint32_t *v)
1533{ 1533{
1534 const uint8_t *p = bytes; 1534 const uint8_t *p = bytes;
1535 uint16_t lo, hi; 1535 uint16_t hi;
1536 uint16_t lo;
1536 p += net_unpack_u16(p, &hi); 1537 p += net_unpack_u16(p, &hi);
1537 p += net_unpack_u16(p, &lo); 1538 p += net_unpack_u16(p, &lo);
1538 *v = ((uint32_t)hi << 16) | lo; 1539 *v = ((uint32_t)hi << 16) | lo;
@@ -1542,7 +1543,8 @@ size_t net_unpack_u32(const uint8_t *bytes, uint32_t *v)
1542size_t net_unpack_u64(const uint8_t *bytes, uint64_t *v) 1543size_t net_unpack_u64(const uint8_t *bytes, uint64_t *v)
1543{ 1544{
1544 const uint8_t *p = bytes; 1545 const uint8_t *p = bytes;
1545 uint32_t lo, hi; 1546 uint32_t hi;
1547 uint32_t lo;
1546 p += net_unpack_u32(p, &hi); 1548 p += net_unpack_u32(p, &hi);
1547 p += net_unpack_u32(p, &lo); 1549 p += net_unpack_u32(p, &lo);
1548 *v = ((uint64_t)hi << 32) | lo; 1550 *v = ((uint64_t)hi << 32) | lo;