From c9d013c0fccdbb00885cadcd0ea424f5f3bacef1 Mon Sep 17 00:00:00 2001 From: zoff99 Date: Sun, 23 Jun 2024 10:38:19 +0200 Subject: [PATCH] update amalgamation --- amalgamation/toxcore_amalgamation.c | 4 ++-- amalgamation/toxcore_amalgamation_no_toxav.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/amalgamation/toxcore_amalgamation.c b/amalgamation/toxcore_amalgamation.c index 46cce3f385..a66c3c76ea 100644 --- a/amalgamation/toxcore_amalgamation.c +++ b/amalgamation/toxcore_amalgamation.c @@ -32467,7 +32467,7 @@ int gc_get_savedpeer_public_key_by_slot_number(const GC_Chat *chat, uint32_t slo const GC_SavedPeerInfo *saved_peer = &chat->saved_peers[slot_number]; if (saved_peer_is_valid(saved_peer)) { const int peernumber = get_peer_number_of_enc_pk(chat, saved_peer->public_key, true); - if (peernumber < 0) { + if (peernumber >= 0) { memcpy(public_key, saved_peer->public_key, ENC_PUBLIC_KEY_SIZE); return 0; } @@ -37291,7 +37291,7 @@ uint32_t get_group_offline_peercount(const GC_Chat *chat) const GC_SavedPeerInfo *saved_peer = &chat->saved_peers[i]; if (saved_peer_is_valid(saved_peer)) { const int peernumber = get_peer_number_of_enc_pk(chat, saved_peer->public_key, true); - if (peernumber < 0) { + if (peernumber >= 0) { ++sum; } } diff --git a/amalgamation/toxcore_amalgamation_no_toxav.c b/amalgamation/toxcore_amalgamation_no_toxav.c index e5a173dbbd..ee7d463e20 100644 --- a/amalgamation/toxcore_amalgamation_no_toxav.c +++ b/amalgamation/toxcore_amalgamation_no_toxav.c @@ -29967,7 +29967,7 @@ int gc_get_savedpeer_public_key_by_slot_number(const GC_Chat *chat, uint32_t slo const GC_SavedPeerInfo *saved_peer = &chat->saved_peers[slot_number]; if (saved_peer_is_valid(saved_peer)) { const int peernumber = get_peer_number_of_enc_pk(chat, saved_peer->public_key, true); - if (peernumber < 0) { + if (peernumber >= 0) { memcpy(public_key, saved_peer->public_key, ENC_PUBLIC_KEY_SIZE); return 0; } @@ -34791,7 +34791,7 @@ uint32_t get_group_offline_peercount(const GC_Chat *chat) const GC_SavedPeerInfo *saved_peer = &chat->saved_peers[i]; if (saved_peer_is_valid(saved_peer)) { const int peernumber = get_peer_number_of_enc_pk(chat, saved_peer->public_key, true); - if (peernumber < 0) { + if (peernumber >= 0) { ++sum; } }