From bca8bee62334de23fdb28ae5a8fa76b5d72089cb Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sun, 7 Dec 2008 13:14:24 +0000 Subject: Fix: auto increment in += is not a post increment... --- ot_livesync.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ot_livesync.c') diff --git a/ot_livesync.c b/ot_livesync.c index f61f0ec..3cad121 100644 --- a/ot_livesync.c +++ b/ot_livesync.c @@ -101,10 +101,11 @@ static void livesync_issuepacket( ) { /* Inform live sync about whats going on. */ void livesync_tell( ot_hash * const info_hash, const ot_peer * const peer ) { int i; - for(i=0;i<20;i+=4) WRITE32(livesync_outbuffer_pos+=4,0,READ32(info_hash,i)); - WRITE32(livesync_outbuffer_pos+=4,0,READ32(peer,0)); - WRITE32(livesync_outbuffer_pos+=4,0,READ32(peer,4)); - + for(i=0;i<20;i+=4) WRITE32(livesync_outbuffer_pos,i,READ32(info_hash,i)); + WRITE32(livesync_outbuffer_pos,20,READ32(peer,0)); + WRITE32(livesync_outbuffer_pos,24,READ32(peer,4)); + livesync_outbuffer_pos += 28; + if( livesync_outbuffer_pos >= livesync_outbuffer_highwater ) livesync_issuepacket(); } -- cgit v1.2.3