Commit 5f5fe85aa for imagemagick.org
commit 5f5fe85aa513d71c5cc92a81fa7c23397476cc5f
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Fri Sep 25 08:03:01 2026 +0200
Switch to memset to make sure this works with all compilers.
diff --git a/coders/tga.c b/coders/tga.c
index b8d70236a..6ab8638eb 100644
--- a/coders/tga.c
+++ b/coders/tga.c
@@ -177,7 +177,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
y;
TGAInfo
- tga_info = { (TGAImageType) 0 };
+ tga_info;
unsigned char
j,
@@ -206,6 +206,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
Read TGA header information.
*/
count=ReadBlob(image,1,&tga_info.id_length);
+ (void) memset(&tga_info,0,sizeof(tga_info));
tga_info.colormap_type=(unsigned char) ReadBlobByte(image);
tga_info.image_type=(TGAImageType) ReadBlobByte(image);
if ((count != 1) ||