diff --git a/macosx/CreatorWindowController.m b/macosx/CreatorWindowController.m index 125f90ab2..aa9d53274 100644 --- a/macosx/CreatorWindowController.m +++ b/macosx/CreatorWindowController.m @@ -194,7 +194,6 @@ trackerString = [@"http://" stringByAppendingString: trackerString]; //parse tracker string - #warning check if it works with https if (tr_httpParseURL([trackerString UTF8String], -1, NULL, NULL, NULL)) { NSAlert * alert = [[[NSAlert alloc] init] autorelease]; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index fcc467fc0..0ac308a5b 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -770,15 +770,18 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * return [NSString stringWithUTF8String: fStat->tracker_stat.scrapeResponse]; } +#warning removes separators? - (NSArray *) allTrackers: (BOOL) separators { - int count = fInfo->trackerCount; - NSMutableArray * allTrackers = [NSMutableArray arrayWithCapacity: count + fInfo->trackers[count-1].tier + 1]; + int count = fInfo->trackerCount, capacity = count; + if (separators) + capacity += fInfo->trackers[count-1].tier + 1; + NSMutableArray * allTrackers = [NSMutableArray arrayWithCapacity: capacity]; int i, tier = -1; for (i = 0; i < count; i++) { - if (tier != fInfo->trackers[i].tier) + if (separators && tier != fInfo->trackers[i].tier) { tier = fInfo->trackers[i].tier; [allTrackers addObject: [NSNumber numberWithInt: tier]];