diff options
Diffstat (limited to 'trackerlogic.c')
-rw-r--r-- | trackerlogic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 2b8ffaf..b3aacc0 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -256,7 +256,7 @@ size_t return_peers_for_torrent( ot_torrent *torrent, unsigned int amount, char | |||
256 | r += sprintf( r, "d8:completei%ie10:incompletei%ie8:intervali600e5:peers%i:", seed_count, peer_count-seed_count, 6*amount ); | 256 | r += sprintf( r, "d8:completei%ie10:incompletei%ie8:intervali600e5:peers%i:", seed_count, peer_count-seed_count, 6*amount ); |
257 | for( index = 0; index < amount; ++index ) { | 257 | for( index = 0; index < amount; ++index ) { |
258 | double step = 1.8*((double)( peer_count - wert - 1 ))/((double)( amount - index )); | 258 | double step = 1.8*((double)( peer_count - wert - 1 ))/((double)( amount - index )); |
259 | int off = random() % (int)floor( step ); | 259 | int off = random() % (int)step; |
260 | off = 1 + ( off % ( peer_count - wert - 1 )); | 260 | off = 1 + ( off % ( peer_count - wert - 1 )); |
261 | wert += off; pool_offset += off; | 261 | wert += off; pool_offset += off; |
262 | 262 | ||