From: Cristy Date: Sun, 9 Apr 2017 21:30:36 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.5-5~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0c9c39a7892d1c7c24862f28af0a0640a87fcd8;p=imagemagick ... --- diff --git a/MagickCore/string.c b/MagickCore/string.c index c397be5e0..3693042c3 100644 --- a/MagickCore/string.c +++ b/MagickCore/string.c @@ -1126,7 +1126,7 @@ MagickExport ssize_t FormatMagickSize(const MagickSizeType size, else count=FormatLocaleString(format,length,"%.*g%s%s",GetMagickPrecision(), extent,units[i],suffix); - if (fabs(bytes*strtod(format,(char **) NULL)-size) < MagickEpsilon) + if (fabs(pow(bytes,(double) i)*strtod(format,(char **) NULL)-size) < MagickEpsilon) { #if defined(_MSC_VER) && (_MSC_VER == 1200) extent=(double) ((MagickOffsetType) size);