Changeset 1643


Ignore:
Timestamp:
Apr 3, 2007, 12:52:42 AM (15 years ago)
Author:
joshe
Message:

Fix benc lists here too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/daemon/libtransmission/bencode.c

    r1639 r1643  
    4242    /* We need a bigger boat */
    4343
    44     len = val->val.l.alloc + ( count / LIST_SIZE ) +
    45         ( count % LIST_SIZE ? LIST_SIZE : 0 );
     44    len = val->val.l.alloc + count +
     45        ( count % LIST_SIZE ? LIST_SIZE - ( count % LIST_SIZE ) : 0 );
    4646    new = realloc( val->val.l.vals, len * sizeof( benc_val_t ) );
    4747    if( NULL == new )
Note: See TracChangeset for help on using the changeset viewer.