Fix mismatching delete in IFF image handler code

Use delete[] for a buffer allocated with new[].

Closes https://github.com/wxWidgets/wxWidgets/pull/1684
This commit is contained in:
orbitcowboy
2019-12-23 12:59:51 +01:00
committed by Vadim Zeitlin
parent 9689bd124e
commit 3b52ed60bb

View File

@@ -414,7 +414,7 @@ int wxIFFDecoder::ReadIFF()
const byte *cmapptr = dataptr + 8;
colors = chunkLen / 3; // calc no of colors
wxDELETE(m_image->pal);
wxDELETEA(m_image->pal);
m_image->colors = colors;
if (colors > 0) {
m_image->pal = new byte[3*colors];