Changeset 12255


Ignore:
Timestamp:
Mar 29, 2011, 4:39:30 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) fix bitfield.c assertion failure reported by Rolcol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bitfield.c

    r12252 r12255  
    5151    const int last_byte = ( end - 1 ) >> 3u;
    5252
     53    if( !b->bit_count )
     54        return 0;
     55
     56    assert( begin < end );
    5357    assert( b->bits != NULL );
    5458
     
    98102tr_bitfieldCountRange( const tr_bitfield * b, size_t begin, size_t end )
    99103{
    100     assert( begin < end );
    101 
    102104    if( tr_bitfieldHasAll( b ) )
    103105        return end - begin;
Note: See TracChangeset for help on using the changeset viewer.