Skip to content
Snippets Groups Projects
Commit bbc9a5ff authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Don't copy memory to itself (valgrind complains).

Rev: src/modules/Image/layer_channel.h:1.10
parent f95d794a
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
|| $Id: layer_channel.h,v 1.9 2008/01/15 21:51:07 grubba Exp $
|| $Id: layer_channel.h,v 1.10 2008/07/11 13:11:39 mast Exp $
*/
/* template for operator layer row function */
......@@ -11,11 +11,13 @@ static void LM_FUNC(rgb_group *s,rgb_group *l,rgb_group *d,
rgb_group *sa,rgb_group *la,rgb_group *da,
int len,double alpha)
{
if (da != sa)
MEMCPY(da,sa,sizeof(rgb_group)*len); /* always copy alpha channel */
#define da da da /* protect */
if (alpha==0.0)
{
#ifdef LAYER_DUAL
if (d != s)
MEMCPY(d,s,sizeof(rgb_group)*len);
#endif
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment