--- xv-3.10a/xvimage.c.orig 2006-10-18 23:40:36.303520000 +0200 +++ xv-3.10a/xvimage.c 2006-10-18 23:50:53.622100250 +0200 @@ -1721,14 +1721,14 @@ case 12: case 15: case 16: { - unsigned short *imagedata, *ip; + unsigned char *imagedata, *ip; byte *pp; - imagedata = (unsigned short *) malloc((size_t) (2*wide*high)); + imagedata = (unsigned char *) malloc((size_t) (2*wide*high)); if (!imagedata) FatalError("couldn't malloc imagedata"); xim = XCreateImage(theDisp,theVisual,dispDEEP,ZPixmap,0, - (char *) imagedata, wide, high, 16, 0); + imagedata, wide, high, 16, 0); if (!xim) FatalError("couldn't create xim!"); if (dispDEEP == 12 && xim->bits_per_pixel != 16) { @@ -1747,8 +1747,8 @@ if (dithpic) xcol = ((*pp) ? white : black) & 0xffff; else xcol = xcolors[*pp] & 0xffff; - *((unsigned char *)ip)++ = (xcol>>8) & 0xff; - *((unsigned char *)ip)++ = (xcol) & 0xff; + *ip++ = (xcol>>8) & 0xff; + *ip++ = (xcol) & 0xff; } } else { /* LSBFirst */ @@ -1758,8 +1758,8 @@ if (dithpic) xcol = ((*pp) ? white : black) & 0xffff; else xcol = xcolors[*pp]; - *((unsigned char *)ip)++ = (xcol) & 0xff; - *((unsigned char *)ip)++ = (xcol>>8) & 0xff; + *ip++ = (xcol) & 0xff; + *ip++ = (xcol>>8) & 0xff; } } }