(trunk libT) #4687 "magnet links behave oddly" -- fixed. Thanks to cfpp2p for some very nice sleuthing on this one.

This commit is contained in:
Jordan Lee 2012-02-04 00:34:39 +00:00
parent 4c31104f4f
commit c56b12690c
1 changed files with 10 additions and 0 deletions

View File

@ -1593,6 +1593,16 @@ tr_bencMergeDicts( tr_benc * target, const tr_benc * source )
tr_bencListCopy( tr_bencDictAddList( target, key, tr_bencListSize( val ) ), val );
}
}
else if( tr_bencIsDict( val ) )
{
tr_benc * target_dict = tr_bencDictFind( target, key );
if( target_dict == NULL )
target_dict = tr_bencDictAddDict( target, key, tr_bencDictSize( val ) );
if( tr_bencIsDict( target_dict ) )
tr_bencMergeDicts( target_dict, val );
}
else
{
tr_dbg( "tr_bencMergeDicts skipping \"%s\"", key );