diff src/glyphs-x.c @ 243:f220cc83d72e r20-5b20

Import from CVS: tag r20-5b20
author cvs
date Mon, 13 Aug 2007 10:17:07 +0200
parents 557eaa0339bf
children 677f6a0ee643
line wrap: on
line diff
--- a/src/glyphs-x.c	Mon Aug 13 10:16:17 2007 +0200
+++ b/src/glyphs-x.c	Mon Aug 13 10:17:07 2007 +0200
@@ -1918,7 +1918,7 @@
     int i,j,x,b;
     unsigned int bytes_per_pixel, scanline_pad;
     unsigned long pixval;
-    unsigned char *q, pixar[3];
+    unsigned char *q, *pixar;
     RunlengthPacket *p;
 
     q = (unsigned char *) unwind.ximage->data;
@@ -1930,6 +1930,8 @@
     /* Convert to multi-byte color-mapped X image. */
     bytes_per_pixel=unwind.ximage->bits_per_pixel >> 3;
 
+    pixar = (unsigned char *) alloca (bytes_per_pixel);
+
     for (i=0; i < unwind.image->packets; i++) {
       if (unwind.image->class == PseudoClass) 
 	pixval = unwind.pixels[p->index];