From 12f15c231f2548e38d630be24d4a9ac3427aa965 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 15 Feb 2019 11:20:43 +0100 Subject: [PATCH] Load_ICO() Fix mask passed to Load_BMP() it has 4 elements : RGBA. --- src/fileformats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fileformats.c b/src/fileformats.c index f18caa16..652d559d 100644 --- a/src/fileformats.c +++ b/src/fileformats.c @@ -3781,7 +3781,7 @@ void Load_ICO(T_IO_Context * context) word width, max_width = 0; word max_bpp = 0; word min_bpp = 0xffff; - dword mask[3]; // R G B + dword mask[4]; // R G B A File_error=0; @@ -3939,6 +3939,7 @@ void Load_ICO(T_IO_Context * context) mask[1] = 0x0000FF00; mask[2] = 0x000000FF; } + mask[3] = 0; Pre_load(context, bmpheader.Width,real_height,File_length_file(file),FORMAT_ICO,PIXEL_SIMPLE,bmpheader.Nb_bits); if (bmpheader.Nb_bits <= 8) Load_BMP_Palette(context, file, nb_colors, 0);