mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
fix: unlock correct dht_friend
This commit is contained in:
parent
32ed67cbf3
commit
306693aba3
|
@ -1 +1 @@
|
|||
02c5926fce8115710fd6493ff3d573c0f9ca218749e231084f846fa98b1172bc /usr/local/bin/tox-bootstrapd
|
||||
d59fb1fec8d9a8ed4eabd956cfe43bfca70e444420b61ab575b8cb194c409d6e /usr/local/bin/tox-bootstrapd
|
||||
|
|
|
@ -1790,7 +1790,7 @@ static void dht_friend_unlock(DHT_Friend *const dht_friend, uint32_t lock_token)
|
|||
// find used slot
|
||||
uint8_t lock_num;
|
||||
for (lock_num = 0; lock_num < DHT_FRIEND_MAX_LOCKS; ++lock_num) {
|
||||
if ((dht_friend->lock_flags & lock_token) > 0) {
|
||||
if (((UINT32_C(1) << lock_num) & lock_token) > 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user