From de88563c18526369b3aa5255cee20c38e7823eec Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 13 Feb 2024 10:54:16 +0800 Subject: [PATCH] add missing break keyword to sd_imageFormatForImageData function while converting NSData to SDImageFormat --- SDWebImage/Core/NSData+ImageContentType.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SDWebImage/Core/NSData+ImageContentType.m b/SDWebImage/Core/NSData+ImageContentType.m index 492d898b..c5f18cc1 100644 --- a/SDWebImage/Core/NSData+ImageContentType.m +++ b/SDWebImage/Core/NSData+ImageContentType.m @@ -74,12 +74,14 @@ return SDImageFormatPDF; } } + break; } case 0x3C: { // Check end with SVG tag if ([data rangeOfData:[kSVGTagEnd dataUsingEncoding:NSUTF8StringEncoding] options:NSDataSearchBackwards range: NSMakeRange(data.length - MIN(100, data.length), MIN(100, data.length))].location != NSNotFound) { return SDImageFormatSVG; } + break; } } return SDImageFormatUndefined;