From 0bd618548483fc0f5a76d5b211129e1a382bf2aa Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Thu, 12 Sep 2019 11:36:20 +0800 Subject: [PATCH] Fix the Animated WebP coder the frame blend index calculation issue, the end condition should be only `endIndex` to match the behavior. --- SDWebImageWebPCoder/Classes/SDImageWebPCoder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImageWebPCoder/Classes/SDImageWebPCoder.m b/SDWebImageWebPCoder/Classes/SDImageWebPCoder.m index 7a11965..f37664a 100644 --- a/SDWebImageWebPCoder/Classes/SDImageWebPCoder.m +++ b/SDWebImageWebPCoder/Classes/SDImageWebPCoder.m @@ -841,7 +841,7 @@ static void FreeImageData(void *info, const void *data, size_t size) { @autoreleasepool { [self sd_blendWebpImageWithCanvas:_canvas iterator:iter colorSpace:_colorSpace]; } - } while ((size_t)iter.frame_num < (endIndex + 1) && WebPDemuxNextFrame(&iter)); + } while ((size_t)iter.frame_num < endIndex && WebPDemuxNextFrame(&iter)); } }