summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2024-04-06 21:35:15 +0200
committerDirk Engling <erdgeist@erdgeist.org>2024-04-06 21:35:15 +0200
commitdb28465e0c8b30cb7d5e4e9636d4b7a10793656c (patch)
treeb273164de5a3edcdc3bc5a2ec9b08f6ad9194c62
parentd9a5f046754581f0edaa0e385f865bcc5ee842e3 (diff)
if copying seeders from behind, use compare_size to advance pointer
-rw-r--r--trackerlogic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trackerlogic.c b/trackerlogic.c
index b52b478..5e32f13 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -215,7 +215,7 @@ static size_t return_peers_all( ot_peerlist *peer_list, size_t peer_size, char *
215 size_t peer_count = bucket_list[bucket].size; 215 size_t peer_count = bucket_list[bucket].size;
216 while( peer_count-- ) { 216 while( peer_count-- ) {
217 if( OT_PEERFLAG_D(peers, peer_size) & PEER_FLAG_SEEDING ) { 217 if( OT_PEERFLAG_D(peers, peer_size) & PEER_FLAG_SEEDING ) {
218 r_end -= peer_size; 218 r_end -= compare_size;
219 memcpy( r_end, peers, compare_size); 219 memcpy( r_end, peers, compare_size);
220 } else { 220 } else {
221 memcpy( reply, peers, compare_size ); 221 memcpy( reply, peers, compare_size );