diff options
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r-- | toxcore/DHT.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 7c9263cd..40f477fd 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -583,7 +583,8 @@ int pack_nodes(uint8_t *data, uint16_t length, const Node_format *nodes, uint16_ | |||
583 | int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed_data_len, const uint8_t *data, | 583 | int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed_data_len, const uint8_t *data, |
584 | uint16_t length, bool tcp_enabled) | 584 | uint16_t length, bool tcp_enabled) |
585 | { | 585 | { |
586 | uint32_t num = 0, len_processed = 0; | 586 | uint32_t num = 0; |
587 | uint32_t len_processed = 0; | ||
587 | 588 | ||
588 | while (num < max_num_nodes && len_processed < length) { | 589 | while (num < max_num_nodes && len_processed < length) { |
589 | const int ipp_size = unpack_ip_port(&nodes[num].ip_port, data + len_processed, length - len_processed, tcp_enabled); | 590 | const int ipp_size = unpack_ip_port(&nodes[num].ip_port, data + len_processed, length - len_processed, tcp_enabled); |