From de5dbad258a076b53fa7dea78b233be3250110bc Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Wed, 21 Jan 2009 00:11:57 +0000 Subject: This memmove was for real... --- ot_stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ot_stats.c') diff --git a/ot_stats.c b/ot_stats.c index 8de1a52..f9bc44b 100644 --- a/ot_stats.c +++ b/ot_stats.c @@ -178,13 +178,13 @@ size_t stats_top10_txt( char * reply ) { ot_peerlist *peer_list = ( ((ot_torrent*)(torrents_list->data))[j] ).peer_list; int idx = 9; while( (idx >= 0) && ( peer_list->peer_count > top10c[idx].val ) ) --idx; if ( idx++ != 9 ) { - memcpy( top10c + idx + 1, top10c + idx, ( 9 - idx ) * sizeof( ot_record ) ); + memmove( top10c + idx + 1, top10c + idx, ( 9 - idx ) * sizeof( ot_record ) ); top10c[idx].val = peer_list->peer_count; top10c[idx].torrent = (ot_torrent*)(torrents_list->data) + j; } idx = 9; while( (idx >= 0) && ( peer_list->seed_count > top10s[idx].val ) ) --idx; if ( idx++ != 9 ) { - memcpy( top10s + idx + 1, top10s + idx, ( 9 - idx ) * sizeof( ot_record ) ); + memmove( top10s + idx + 1, top10s + idx, ( 9 - idx ) * sizeof( ot_record ) ); top10s[idx].val = peer_list->seed_count; top10s[idx].torrent = (ot_torrent*)(torrents_list->data) + j; } -- cgit v1.2.3