summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/DHT.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index b17d5b19..16ab6f73 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -74,8 +74,8 @@ static int id_closest(uint8_t *id, uint8_t *id1, uint8_t *id2)
74 74
75 for (i = 0; i < CLIENT_ID_SIZE; ++i) { 75 for (i = 0; i < CLIENT_ID_SIZE; ++i) {
76 76
77 distance1 = id[i] ^ id1[i]; 77 distance1 = abs(((int8_t *)id)[i] ^ ((int8_t *)id1)[i]);
78 distance2 = id[i] ^ id2[i]; 78 distance2 = abs(((int8_t *)id)[i] ^ ((int8_t *)id2)[i]);
79 79
80 if (distance1 < distance2) 80 if (distance1 < distance2)
81 return 1; 81 return 1;