Fix handling of XBM images on MS-Windows
* src/image.c (xbm_load) [HAVE_NTGUI]: Fix calculation of 'nbytes' when inverting XBM data bits. (Bug#25661)
This commit is contained in:
parent
09d5083420
commit
ac83b2dfe4
1 changed files with 2 additions and 2 deletions
|
@ -3110,8 +3110,8 @@ xbm_load (struct frame *f, struct image *img)
|
|||
int nbytes, i;
|
||||
/* Windows mono bitmaps are reversed compared with X. */
|
||||
invertedBits = bits;
|
||||
nbytes = (img->width + CHAR_BIT - 1) / CHAR_BIT;
|
||||
SAFE_NALLOCA (bits, nbytes, img->height);
|
||||
nbytes = (img->width + CHAR_BIT - 1) / CHAR_BIT * img->height;
|
||||
SAFE_NALLOCA (bits, 1, nbytes);
|
||||
for (i = 0; i < nbytes; i++)
|
||||
bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue