--- plug-ins/common/sparkle.c.orig	2005-01-05 19:05:05.716613560 +0200
+++ plug-ins/common/sparkle.c	2005-01-05 22:49:24.444575912 +0200
@@ -692,7 +692,7 @@
             {
               if (has_alpha && s[alpha] == 0)
                 {
-                  memset (dest, 0, alpha);
+                  memset (d, 0, alpha);
                 }
               else
                 {
@@ -927,6 +927,7 @@
   gint    ok;
   GimpRGB gimp_color;
   guchar  pixel[MAX_CHANNELS];
+  guchar  chosen_color[MAX_CHANNELS];
   guchar  color[MAX_CHANNELS];
 
   theta = angle;
@@ -941,24 +942,36 @@
 
     case FOREGROUND:
       gimp_context_get_foreground (&gimp_color);
-      gimp_rgb_get_uchar (&gimp_color, &pixel[0], &pixel[1], &pixel[2]);
+      gimp_rgb_get_uchar (&gimp_color, &chosen_color[0], &chosen_color[1],
+                          &chosen_color[2]);
       break;
 
     case BACKGROUND:
       gimp_context_get_background (&gimp_color);
-      gimp_rgb_get_uchar (&gimp_color, &pixel[0], &pixel[1], &pixel[2]);
+      gimp_rgb_get_uchar (&gimp_color, &chosen_color[0], &chosen_color[1],
+                          &chosen_color[2]);
       break;
     }
 
   /* draw the major spikes */
   for (i = 0; i < svals.spike_pts; i++)
     {
-      if (svals.colortype == NATURAL)
-        gimp_pixel_rgn_get_pixel (dest_rgn, pixel, xr, yr);
+      gimp_pixel_rgn_get_pixel (dest_rgn, pixel, xr, yr);  
+      if (svals.colortype==NATURAL)
+        {
+          color[0] = pixel[0];
+          color[1] = pixel[1];
+          color[2] = pixel[2];
+        }
+      else
+        {
+          color[0] = chosen_color[0];
+          color[1] = chosen_color[1];
+          color[2] = chosen_color[2];
+        }
 
-      color[0] = pixel[0];
-      color[1] = pixel[1];
-      color[2] = pixel[2];
+      /* Bug fix: make sure the alpha is inherited from the pixel. */
+      color[3] = pixel[3];
 
       if (svals.inverse)
         {
