]> granicus.if.org Git - imagemagick/commitdiff
Changed type of offset to avoid type casts.
authorDirk Lemstra <dirk@lemstra.org>
Fri, 4 Oct 2019 09:37:16 +0000 (11:37 +0200)
committerDirk Lemstra <dirk@lemstra.org>
Fri, 4 Oct 2019 09:37:16 +0000 (11:37 +0200)
coders/clipboard.c

index 50d51f04ffc2af53a2252c5ef12f61325bf2b777..e84ab98a1a98155874144f5f87a2c840d2918999 100644 (file)
@@ -138,7 +138,7 @@ static Image *ReadCLIPBOARDImage(const ImageInfo *image_info,
   ssize_t
     y;
 
-  unsigned int
+  unsigned char
     offset;
 
   void
@@ -186,7 +186,7 @@ static Image *ReadCLIPBOARDImage(const ImageInfo *image_info,
   (void) GlobalUnlock(clip_mem);
   (void) CloseClipboard();
   memset(clip_data,0,BMP_HEADER_SIZE);
-  offset=((unsigned int) p[0])+BMP_HEADER_SIZE;
+  offset=p[0]+BMP_HEADER_SIZE;
   p-=BMP_HEADER_SIZE;
   p[0]='B';
   p[1]='M';