Committed by
GitHub
Merge pull request #2051 from dreampiggy/fix_progressive_totalsize_protect
Change finished check from equal to equal or greater than to protect …
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -337,7 +337,7 @@ didReceiveResponse:(NSURLResponse *)response | @@ -337,7 +337,7 @@ didReceiveResponse:(NSURLResponse *)response | ||
337 | // Get the total bytes downloaded | 337 | // Get the total bytes downloaded |
338 | const NSInteger totalSize = imageData.length; | 338 | const NSInteger totalSize = imageData.length; |
339 | // Get the finish status | 339 | // Get the finish status |
340 | - BOOL finished = (self.expectedSize == totalSize); | 340 | + BOOL finished = (totalSize >= self.expectedSize); |
341 | 341 | ||
342 | if (!_imageSource) { | 342 | if (!_imageSource) { |
343 | _imageSource = CGImageSourceCreateIncremental(NULL); | 343 | _imageSource = CGImageSourceCreateIncremental(NULL); |
-
Please register or login to post a comment