Skip to content

Commit 306693a

Browse files
committed
fix: unlock correct dht_friend
1 parent 32ed67c commit 306693a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
02c5926fce8115710fd6493ff3d573c0f9ca218749e231084f846fa98b1172bc /usr/local/bin/tox-bootstrapd
1+
d59fb1fec8d9a8ed4eabd956cfe43bfca70e444420b61ab575b8cb194c409d6e /usr/local/bin/tox-bootstrapd

toxcore/DHT.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ static void dht_friend_unlock(DHT_Friend *const dht_friend, uint32_t lock_token)
17901790
// find used slot
17911791
uint8_t lock_num;
17921792
for (lock_num = 0; lock_num < DHT_FRIEND_MAX_LOCKS; ++lock_num) {
1793-
if ((dht_friend->lock_flags & lock_token) > 0) {
1793+
if (((UINT32_C(1) << lock_num) & lock_token) > 0) {
17941794
break;
17951795
}
17961796
}

0 commit comments

Comments
 (0)