]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Thu, 6 Dec 2018 01:03:15 +0000 (20:03 -0500)
committerCristy <urban-warrior@imagemagick.org>
Thu, 6 Dec 2018 01:03:15 +0000 (20:03 -0500)
coders/xpm.c

index 2b3d9dda785743639bc89e0eb902df437313219f..df8229bb842d7dce1e73010213fa139843bf2226 100644 (file)
@@ -756,6 +756,7 @@ static MagickBooleanType WritePICONImage(const ImageInfo *image_info,
         picon->colormap,(size_t) colors,sizeof(*picon->colormap));
       if (picon->colormap == (PixelInfo *) NULL)
         ThrowWriterException(ResourceLimitError,"MemoryAllocationError");
+      SetPixelIndex(picon,(Quantum) picon->colors,0);
       for (y=0; y < (ssize_t) picon->rows; y++)
       {
         q=GetAuthenticPixels(picon,0,y,picon->columns,1,exception);