From 9fef316dfa1f31fd96dc8a4e402f1e5f91756f9d Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Mon, 9 Oct 2017 12:48:29 +0800 Subject: [PATCH] Change finished check from equal to equal or greater than to protect accident condition --- SDWebImage/SDWebImageDownloaderOperation.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageDownloaderOperation.m b/SDWebImage/SDWebImageDownloaderOperation.m index 4de12320..f84996aa 100644 --- a/SDWebImage/SDWebImageDownloaderOperation.m +++ b/SDWebImage/SDWebImageDownloaderOperation.m @@ -337,7 +337,7 @@ didReceiveResponse:(NSURLResponse *)response // Get the total bytes downloaded const NSInteger totalSize = imageData.length; // Get the finish status - BOOL finished = (self.expectedSize == totalSize); + BOOL finished = (totalSize >= self.expectedSize); if (!_imageSource) { _imageSource = CGImageSourceCreateIncremental(NULL);