]> granicus.if.org Git - transmission/commitdiff
#5134 Magnet links not adding all trackers with tr.0=
authorMitchell Livingston <livings124@transmissionbt.com>
Wed, 14 Nov 2012 02:22:55 +0000 (02:22 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Wed, 14 Nov 2012 02:22:55 +0000 (02:22 +0000)
libtransmission/magnet.c

index 7cd21ae8da83b4f88772a6d8714a6ba8259bc57b..9265d4b04a6d95e74119e59b0b882c58aa73f0d4 100644 (file)
@@ -156,7 +156,7 @@ tr_magnetParse( const char * uri )
                 int i;
                 if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) )
                     tr[trCount++] = tr_http_unescape( val, vallen );
-                else if( ( sscanf( key, "tr.%d=", &i ) == 1 ) && ( i > 0 ) ) /* ticket #3341 */
+                else if( ( sscanf( key, "tr.%d=", &i ) == 1 ) && ( i >= 0 ) ) /* ticket #3341 and #5134 */
                     tr[trCount++] = tr_http_unescape( val, vallen );
             }