From 250fa7722edea4c711d833b3d13573e357eeb8fa Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Fri, 23 Aug 2019 14:31:09 +0200 Subject: [PATCH] Added missing typecast. --- coders/jp2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coders/jp2.c b/coders/jp2.c index 6a464bbbd..63030715a 100644 --- a/coders/jp2.c +++ b/coders/jp2.c @@ -1037,7 +1037,8 @@ static MagickBooleanType WriteJP2Image(const ImageInfo *image_info,Image *image, register int *q; - scale=(double) ((1UL << jp2_image->comps[i].prec)-1)/QuantumRange; + scale=(double) (((size_t) 1UL << jp2_image->comps[i].prec)-1)/ + QuantumRange; q=jp2_image->comps[i].data+(y/jp2_image->comps[i].dy* image->columns/jp2_image->comps[i].dx+x/jp2_image->comps[i].dx); switch (i) -- 2.40.0