From: cristy Date: Mon, 17 Feb 2014 01:46:28 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2665 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb34f5cabef5c07f924c3c8266cbbefc64fda5d3;p=imagemagick --- diff --git a/MagickCore/locale.c b/MagickCore/locale.c index ed6c0c053..faf3dd601 100644 --- a/MagickCore/locale.c +++ b/MagickCore/locale.c @@ -1066,8 +1066,7 @@ static void LocaleFatalErrorHandler( exit(1); } -static inline size_t MagickMin(const unsigned int x, - const unsigned int y) +static inline size_t MagickMin(const size_t x,const size_t y) { if (x < y) return(x); @@ -1252,7 +1251,8 @@ static MagickBooleanType LoadLocaleList(const char *xml,const char *filename, q--; while ((isspace((int) ((unsigned char) *q)) != 0) && (q > p)) q--; - (void) CopyMagickString(message,p,MagickMin(q-p+2,MaxTextExtent)); + (void) CopyMagickString(message,p,MagickMin((size_t) (q-p+2), + MaxTextExtent)); locale_info=(LocaleInfo *) AcquireMagickMemory(sizeof(*locale_info)); if (locale_info == (LocaleInfo *) NULL) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");