]> granicus.if.org Git - imagemagick/blobdiff - coders/wpg.c
(no commit message)
[imagemagick] / coders / wpg.c
index 593ef76a4bd662e58b0e203c52c49214607fae6f..c9b4a645c3e47db1f5e1597d7eba387d2618b8c5 100644 (file)
@@ -597,8 +597,8 @@ static int UnpackWPG2Raster(Image *image,int bpp)
           if(x!=0)
             {
               (void) fprintf(stderr,
-                             "\nUnsupported WPG2 unaligned token RST x=%lu, please report!\n"
-                             ,(unsigned long) x);
+                             "\nUnsupported WPG2 unaligned token RST x=%.20g, please report!\n"
+                             ,(double) x);
               return(-3);
             }
           {
@@ -1260,7 +1260,11 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
 
               if ((image->colors == 0) && (bpp != 24))
                 {
-                  image->colors=1 << bpp;
+                  size_t
+                    one;
+
+                  one=1;
+                  image->colors=one << bpp;
                   if (!AcquireImageColormap(image,image->colors))
                     goto NoMemory;
                 }