summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-12-09 09:10:03 -0500
committerirungentoo <irungentoo@gmail.com>2015-12-09 09:10:03 -0500
commit8fa264e7709d64377f688fc9efce528ebd75618f (patch)
treee8b3bf1f77b75d7239bce343c33dca77de51aa12
parentdeb0b358a5c6c2d05b4b6574fe864d5b078cf5f4 (diff)
Small fix.
-rw-r--r--toxcore/DHT.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index 6ff7e295..1edc86ae 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -100,10 +100,12 @@ int id_closest(const uint8_t *pk, const uint8_t *pk1, const uint8_t *pk2)
100 100
101 if (i == (crypto_box_PUBLICKEYBYTES - 1)) { 101 if (i == (crypto_box_PUBLICKEYBYTES - 1)) {
102 if (d1_abs) 102 if (d1_abs)
103 ++distance1; 103 if (distance1 != UINT8_MAX)
104 ++distance1;
104 105
105 if (d2_abs) 106 if (d2_abs)
106 ++distance2; 107 if (distance2 != UINT8_MAX)
108 ++distance2;
107 } 109 }
108 110
109 if (distance1 < distance2) 111 if (distance1 < distance2)