From 8b81d60137c929cc50f50a53c3905e8ff313628b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Feb 2013 13:45:06 +0000 Subject: memory allocation fix git-svn-id: http://svn.miranda-ng.org/main/trunk@3782 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Popup/src/bitmap_funcs.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Popup/src/bitmap_funcs.cpp') diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 8854c8178e..8e37e796ad 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -352,7 +352,7 @@ void MyBitmap::BlendColorized(MyBitmap *bmp, int x, int y, int w, int h, COLOR32 PU_DIV255(koef2g * cl * alpha), PU_DIV255(koef2b * cl * alpha), alpha); -#pragma warning(pop) +#pragma warning(pop) // COLOR32 cl = getr(bmp->bits[int(i*ky)*bmp->width + int(j*kx)]); // COLOR32 src = (cl > 128) ? // rgba(koef1r * cl + br, koef1g * cl + bg, koef1b * cl + bb, alpha): @@ -419,7 +419,7 @@ void MyBitmap::DrawColorized(MyBitmap *bmp, int x, int y, int w, int h, COLOR32 PU_DIV255(koef2g * cl * alpha), PU_DIV255(koef2b * cl * alpha), alpha); -#pragma warning(pop) +#pragma warning(pop) // bits[(i+y)*width + (j+x)] = (cl > 128) ? // rgba(koef1r * cl + br, koef1g * cl + bg, koef1b * cl + bb, geta(bmp->bits[int(i*ky)*bmp->width + int(j*kx)])): // rgba(koef2r * cl, koef2g * cl, koef2b * cl, geta(bmp->bits[int(i*ky)*bmp->width + int(j*kx)])); @@ -521,7 +521,7 @@ void MyBitmap::BlendPartColorized(MyBitmap *bmp, int xin, int yin, int win, int PU_DIV255(koef2g * cl * alpha), PU_DIV255(koef2b * cl * alpha), alpha); -#pragma warning(pop) +#pragma warning(pop) // COLOR32 cl = getr(bmp->bits[int(i*ky)*bmp->width + int(j*kx)]); // COLOR32 src = (cl > 128) ? // rgba(koef1r * cl + br, koef1g * cl + bg, koef1b * cl + bb, alpha): @@ -753,7 +753,7 @@ HRGN MyBitmap::buildOpaqueRgn(int level, bool opaque) } HRGN hRgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount*sizeof(RECT), (LPRGNDATA)pRgnData); - delete pRgnData; + delete[] pRgnData; return hRgn; } @@ -938,7 +938,7 @@ bool MyBitmap::loadFromFile(const char *fn, const char *fnAlpha) } else { char ext[5]; - memcpy(ext,fn+(strlen(fn)-4),5); + memcpy(ext,fn+(strlen(fn)-4),5); if (!lstrcmpiA(ext,".png")) { return loadFromFile_png(fn, fnAlpha); -- cgit v1.2.3