From: Vadim Zeitlin Date: Fri, 9 May 2003 23:52:20 +0000 (+0000) Subject: memory for alpha channel was over allocated by a factor of 3 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/edf8e8e071eb4ba7313c156ab8e2a2878ffcf7dc memory for alpha channel was over allocated by a factor of 3 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/image.cpp b/src/common/image.cpp index 289eb78759..cccfe9f1bf 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -809,8 +809,7 @@ void wxImage::SetAlpha( unsigned char *alpha ) if ( !alpha ) { - alpha = (unsigned char *) - malloc(M_IMGDATA->m_width*M_IMGDATA->m_height*3); + alpha = (unsigned char *)malloc(M_IMGDATA->m_width*M_IMGDATA->m_height); } delete [] M_IMGDATA->m_alpha;