]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sat, 10 Mar 2018 21:58:32 +0000 (16:58 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 10 Mar 2018 21:58:32 +0000 (16:58 -0500)
MagickCore/type.c

index 2cedba816945c53a1b99e5497138ea668a101416..21ebadb21788616526cf285aef36f45b9aa969ff 100644 (file)
@@ -367,7 +367,7 @@ MagickExport const TypeInfo *GetTypeInfoByFamily(const char *family,
   (void) GetTypeInfo("*",exception);
   if (type_cache == (SplayTreeInfo *) NULL)
     return((TypeInfo *) NULL);
-  font_weight=weight == 0 ? 400 : weight;
+  font_weight=(size_t) (weight == 0 ? 400 : weight);
   LockSemaphoreInfo(type_semaphore);
   ResetSplayTreeIterator(type_cache);
   type_info=(const TypeInfo *) NULL;
@@ -1309,7 +1309,7 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *cache,const char *xml,
 
             weight=ParseCommandOption(MagickWeightOptions,MagickFalse,token);
             if (weight == -1)
-              weight=StringToUnsignedLong(token);
+              weight=(ssize_t) StringToUnsignedLong(token);
             type_info->weight=(size_t) weight;
             break;
           }