Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > nonfree-release-src > by-pkgid > 86317ec462188f155161894fac7b1c53 > files > 2

xv-3.10a-15.mga5.nonfree.src.rpm

--- ./xvimage.c.gcc4	2006-01-22 18:26:55.388015713 +0100
+++ ./xvimage.c	2006-01-22 18:28:01.356541415 +0100
@@ -1722,6 +1722,7 @@
   case 15:
   case 16: {
     unsigned short  *imagedata, *ip;
+    unsigned char *ip2;
     byte  *pp;
 
     imagedata = (unsigned short *) malloc((size_t) (2*wide*high));
@@ -1747,8 +1748,11 @@
 	if (dithpic) xcol = ((*pp) ? white : black) & 0xffff;
 		else xcol = xcolors[*pp] & 0xffff;
 
-	*((unsigned char *)ip)++ = (xcol>>8) & 0xff;
-	*((unsigned char *)ip)++ = (xcol) & 0xff;
+    ip2 = (unsigned char *) ip;
+    ip2++;
+    *ip2 = (xcol>>8) & 0xff;
+    ip2++;
+    *ip2 = (xcol) & 0xff;
       }
     }
     else {   /* LSBFirst */
@@ -1758,8 +1762,11 @@
 	if (dithpic) xcol = ((*pp) ? white : black) & 0xffff;
 	        else xcol = xcolors[*pp];
 
-	*((unsigned char *)ip)++ = (xcol) & 0xff;
-	*((unsigned char *)ip)++ = (xcol>>8) & 0xff;
+    ip2 = (unsigned char *) ip;
+    ip2++;
+	*ip2 = (xcol) & 0xff;
+    ip2++;
+	*ip2 = (xcol>>8) & 0xff;
       }
     }
   }