]> granicus.if.org Git - imagemagick/commitdiff
Fixed invalid typecast.
authorDirk Lemstra <dirk@git.imagemagick.org>
Tue, 26 Dec 2017 18:35:10 +0000 (19:35 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Tue, 26 Dec 2017 18:35:10 +0000 (19:35 +0100)
coders/psd.c

index add84eea8990824cdb3b79c0811830625ed00ceb..94b38fd0d12200366c06a68db1ab13b41832e4f5 100644 (file)
@@ -2358,7 +2358,7 @@ static inline ssize_t SetPSDOffset(const PSDInfo *psd_info,Image *image,
 {
   if (psd_info->version == 1)
     return(WriteBlobMSBShort(image,(unsigned short) offset));
-  return(WriteBlobMSBLong(image,(unsigned short) offset));
+  return(WriteBlobMSBLong(image,(unsigned int) offset));
 }
 
 static inline ssize_t WritePSDOffset(const PSDInfo *psd_info,Image *image,
@@ -2375,7 +2375,7 @@ static inline ssize_t WritePSDOffset(const PSDInfo *psd_info,Image *image,
   if (psd_info->version == 1)
     result=WriteBlobMSBShort(image,(unsigned short) size);
   else
-    result=(WriteBlobMSBLong(image,(unsigned short) size));
+    result=WriteBlobMSBLong(image,(unsigned int) size);
   SeekBlob(image,current_offset,SEEK_SET);
   return(result);
 }