From: Dirk Lemstra Date: Sun, 4 Feb 2018 16:54:46 +0000 (+0100) Subject: Fixed comparison and added missing include. X-Git-Tag: 7.0.7-23~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2daecaffceb344392ab40d2dcb0dce4d85dca4fb;p=imagemagick Fixed comparison and added missing include. --- diff --git a/MagickCore/quantum-private.h b/MagickCore/quantum-private.h index ba10ed5b9..ce5f1a88a 100644 --- a/MagickCore/quantum-private.h +++ b/MagickCore/quantum-private.h @@ -20,6 +20,7 @@ #include "MagickCore/memory_.h" #include "MagickCore/cache.h" +#include "MagickCore/image-private.h" #if defined(__cplusplus) || defined(c_plusplus) extern "C" { @@ -95,8 +96,8 @@ static inline MagickSizeType GetQuantumRange(const size_t depth) one; one=1; - return((MagickSizeType) ((one << (MagickMax(depth,64)-1))+ - ((one << (MagickMax(depth,64)-1))-1))); + return((MagickSizeType) ((one << (MagickMin(depth,64)-1))+ + ((one << (MagickMin(depth,64)-1))-1))); } static inline float HalfToSinglePrecision(const unsigned short half)