]> granicus.if.org Git - transmission/commitdiff
maybe fix the forced-recheck-on-startup bug that pea_, John_Clay, and Gimp_ reported...
authorCharles Kerr <charles@transmissionbt.com>
Wed, 11 Jun 2008 02:19:40 +0000 (02:19 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Wed, 11 Jun 2008 02:19:40 +0000 (02:19 +0000)
libtransmission/completion.c

index c3ae468bdf6809afdb05ffcfa2de8d75f7ca61bc..0dad5a6c80f7ac194f1504ecc5f326c73f0f397e 100644 (file)
@@ -228,7 +228,7 @@ tr_cpBlockBitfieldSet( tr_completion * cp, tr_bitfield * bitfield )
     assert( bitfield );
     assert( cp->blockBitfield );
 
-    if( !cp || !tr_bitfieldTestFast( bitfield, cp->tor->blockCount ) )
+    if( !tr_bitfieldTestFast( bitfield, cp->tor->blockCount-1 ) )
         return TR_ERROR_ASSERT;
 
     tr_cpReset( cp );