X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2884838a3c63fc196077ae0353cab3b5c8c5e6d7..39406a5d051fdcc372367c4dfedc6d711fdf51fd:/src/common/xpmdecod.cpp diff --git a/src/common/xpmdecod.cpp b/src/common/xpmdecod.cpp index 04b25527e2..12612d62ba 100644 --- a/src/common/xpmdecod.cpp +++ b/src/common/xpmdecod.cpp @@ -653,6 +653,7 @@ static const char *ParseColor(const char *data) struct wxXPMColourMapData { + wxXPMColourMapData() { R = G = B = 0; } unsigned char R,G,B; }; WX_DECLARE_STRING_HASH_MAP(wxXPMColourMapData, wxXPMColourMap); @@ -699,6 +700,7 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data) /* * Create colour map: */ + wxXPMColourMapData clr_data; for (i = 0; i < colors_cnt; i++) { const char *xmpColLine = xpm_data[1 + i]; @@ -711,8 +713,6 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data) return wxNullImage; } - wxXPMColourMapData clr_data; - for (i_key = 0; i_key < chars_per_pixel; i_key++) key[i_key] = (wxChar)xmpColLine[i_key]; clr_def = ParseColor(xmpColLine + chars_per_pixel);