mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-03-17 21:18:40 +00:00
Merge pull request #203 from bitstadium/feature/prevent-duplicate-binary-images
Make sure we don't add images to final report twice
This commit is contained in:
@@ -539,7 +539,15 @@ static const char *findSEL (const char *imageName, NSString *imageUUID, uint64_t
|
||||
|
||||
/* Images. The iPhone crash report format sorts these in ascending order, by the base address */
|
||||
[text appendString: @"Binary Images:\n"];
|
||||
NSMutableArray *addedImagesBaseAddresses = @[].mutableCopy;
|
||||
for (BITPLCrashReportBinaryImageInfo *imageInfo in [report.images sortedArrayUsingFunction: bit_binaryImageSort context: nil]) {
|
||||
// Make sure we don't add duplicates
|
||||
if ([addedImagesBaseAddresses containsObject:@(imageInfo.imageBaseAddress)]) {
|
||||
continue;
|
||||
} else {
|
||||
[addedImagesBaseAddresses addObject:@(imageInfo.imageBaseAddress)];
|
||||
}
|
||||
|
||||
NSString *uuid;
|
||||
/* Fetch the UUID if it exists */
|
||||
if (imageInfo.hasImageUUID)
|
||||
|
||||
Reference in New Issue
Block a user