Common subdirectories: ./winicon/CVS and ./winicon-fixed/CVS
Common subdirectories: ./winicon/.deps and ./winicon-fixed/.deps
Only in ./winicon-fixed/: icodialog.o
diff -up ./winicon/icoload.c ./winicon-fixed/icoload.c
--- ./winicon/icoload.c	2006-10-13 20:39:48.000000000 +0300
+++ ./winicon-fixed/icoload.c	2006-10-13 20:28:00.000000000 +0300
@@ -280,6 +280,8 @@ ico_read_icon (FILE    *fp,
   guchar             *xor_map, *and_map;
   guint32            *palette;
   guint32            *dest_vec;
+  guchar             *row;
+  gint                rowstride;
 
   palette = NULL;
 
@@ -409,28 +411,34 @@ ico_read_icon (FILE    *fp,
     default:
       {
         gint bytespp = data.bpp/8;
+        rowstride = ico_rowstride (w, data.bpp);
 
         for (y = 0; y < h; y++)
-          for (x = 0; x < w; x++)
-            {
-              guint32 *dest = dest_vec + (h - 1 - y) * w + x;
-
-              B_VAL_GIMP (dest) = xor_map[(y * w + x) * bytespp];
-              G_VAL_GIMP (dest) = xor_map[(y * w + x) * bytespp + 1];
-              R_VAL_GIMP (dest) = xor_map[(y * w + x) * bytespp + 2];
-
-              if (data.bpp < 32)
-                {
-                  if (ico_get_bit_from_data (and_map, w, y * w + x))
-                    A_VAL_GIMP (dest) = 0;
-                  else
-                    A_VAL_GIMP (dest) = 255;
-                }
-              else
-                {
-                  A_VAL_GIMP (dest) = xor_map[(y * w + x) * bytespp + 3];
-                }
-            }
+          {
+            row = xor_map + rowstride * y;
+            for (x = 0; x < w; x++)
+              {
+                guint32 *dest = dest_vec + (h - 1 - y) * w + x;
+
+                B_VAL_GIMP (dest) = row[0];
+                G_VAL_GIMP (dest) = row[1];
+                R_VAL_GIMP (dest) = row[2];
+
+                if (data.bpp < 32)
+                  {
+                    if (ico_get_bit_from_data (and_map, w, y * w + x))
+                      A_VAL_GIMP (dest) = 0;
+                    else
+                      A_VAL_GIMP (dest) = 255;
+                  }
+                else
+                  {
+                    A_VAL_GIMP (dest) = row[3];
+                  }
+
+                row += bytespp;
+              }
+          }
       }
     }
   if (palette)
Only in ./winicon-fixed/: icoload.o
diff -up ./winicon/icosave.c ./winicon-fixed/icosave.c
--- ./winicon/icosave.c	2006-10-13 20:40:19.000000000 +0300
+++ ./winicon-fixed/icosave.c	2006-10-13 20:31:22.000000000 +0300
@@ -735,7 +735,6 @@ ico_write_icon (FILE   *fp,
 
   /* Create and_map. It's padded out to 32 bits per line: */
   and_map = ico_alloc_map (width, height, 1, &and_len);
-  and_len = and_len;
 
   for (y = 0; y < height; y++)
     for (x = 0; x < width; x++)
@@ -748,7 +747,6 @@ ico_write_icon (FILE   *fp,
       }
 
   xor_map = ico_alloc_map (width, height, header.bpp, &xor_len);
-  xor_len = xor_len;
 
   /* Now fill in the xor map */
   switch (header.bpp)
@@ -833,7 +831,7 @@ ico_write_icon (FILE   *fp,
         {
           guchar *row = xor_map + (xor_len * (height - y - 1) / height);
 
-          for (x = 0; x < height; x++)
+          for (x = 0; x < width; x++)
             {
               pixel = (guint8 *) &buffer32[y * width + x];
 
Only in ./winicon-fixed/: icosave.o
Only in ./winicon-fixed/: icosave-old.c
Common subdirectories: ./winicon/.libs and ./winicon-fixed/.libs
Only in ./winicon-fixed/: main.o
Only in ./winicon-fixed/: winicon
