diff --git a/coders/tga.c b/coders/tga.c index 40652bb6be..c820051d79 100644 --- a/coders/tga.c +++ b/coders/tga.c @@ -453,7 +453,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception) if ((x & 0x07) == 0) index=(IndexPacket) ReadBlobByte(image); else - index=(Quantum) ((ssize_t) index << 1); + index=(Quantum) ((size_t) index << 1); if (tga_info.colormap_type != 0) pixel=image->colormap[(ssize_t) ConstrainColormapIndex(image, ((unsigned char) index) & 0x80 ? 1 : 0)];