summaryrefslogtreecommitdiff
path: root/toxcore/DHT.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r--toxcore/DHT.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index f38ce3a5..84c00c70 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -1579,6 +1579,7 @@ void DHT_save(DHT *dht, uint8_t *data)
1579 len = num * sizeof(Client_data); 1579 len = num * sizeof(Client_data);
1580 type = DHT_STATE_TYPE_CLIENTS; 1580 type = DHT_STATE_TYPE_CLIENTS;
1581 data = z_state_save_subheader(data, len, type); 1581 data = z_state_save_subheader(data, len, type);
1582
1582 if (num) { 1583 if (num) {
1583 Client_data *clients = (Client_data *)data; 1584 Client_data *clients = (Client_data *)data;
1584 1585
@@ -1586,6 +1587,7 @@ void DHT_save(DHT *dht, uint8_t *data)
1586 if (dht->close_clientlist[i].timestamp != 0) 1587 if (dht->close_clientlist[i].timestamp != 0)
1587 memcpy(&clients[num++], &dht->close_clientlist[i], sizeof(Client_data)); 1588 memcpy(&clients[num++], &dht->close_clientlist[i], sizeof(Client_data));
1588 } 1589 }
1590
1589 data += len; 1591 data += len;
1590} 1592}
1591 1593