Mercurial > hg > xemacs-beta
diff src/glyphs-x.c @ 333:4f79e16b1112 r21-0-64
Import from CVS: tag r21-0-64
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:49:50 +0200 |
parents | 33bdb3d4b97f |
children | 4711e16a8e49 |
line wrap: on
line diff
--- a/src/glyphs-x.c Mon Aug 13 10:49:08 2007 +0200 +++ b/src/glyphs-x.c Mon Aug 13 10:49:50 2007 +0200 @@ -144,13 +144,14 @@ bitmap_pad = ((depth > 16) ? 32 : (depth > 8) ? 16 : 8); - byte_cnt = bitmap_pad >> 3; outimg = XCreateImage (dpy, vis, depth, ZPixmap, 0, 0, width, height, bitmap_pad, 0); if (!outimg) return NULL; + byte_cnt = outimg->bits_per_pixel >> 3; + data = (unsigned char *) xmalloc (outimg->bytes_per_line * height); if (!data) {