[gegl] Fix bug in previous commit.



commit f21fb47f4b64c101373f1194cb4ba5755d065c4e
Author: �yvind Kolås <pippin gimp org>
Date:   Tue Dec 1 19:14:40 2009 +0000

    Fix bug in previous commit.
    
    Do not increment pointers inside macros that evaluates their arguments
    multiple times.

 operations/common/opacity.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/opacity.c b/operations/common/opacity.c
index 6452759..31ebfea 100644
--- a/operations/common/opacity.c
+++ b/operations/common/opacity.c
@@ -114,10 +114,16 @@ process_simd (GeglOperation       *op,
     }
   else if (o->value == 1.0)
     while (samples--)
-      *(out++) = *(in++) * g4float_all (*(aux++));
+      {
+        *(out++) = *(in++) * g4float_all (*(aux));
+        aux++;
+      }
   else
     while (samples--)
-      *(out++) = *(in++) * g4float_all ((*(aux++))) * value;
+      {
+        *(out++) = *(in++) * g4float_all ((*(aux))) * value;
+        aux++;
+      }
   return TRUE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]