diff options
| author | Eli Zaretskii | 2017-02-11 11:55:11 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-02-11 11:55:11 +0200 |
| commit | ac83b2dfe4504babfbafc5efb37dbde4bed34fed (patch) | |
| tree | b2517154013c23d327eabdac553c31dbdeaab48c | |
| parent | 09d50834206ff48bf6ac214e8cfb31d281ba993c (diff) | |
| download | emacs-ac83b2dfe4504babfbafc5efb37dbde4bed34fed.tar.gz emacs-ac83b2dfe4504babfbafc5efb37dbde4bed34fed.zip | |
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)
| -rw-r--r-- | src/image.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c index a7a94165282..1e8ebfd40d5 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -3110,8 +3110,8 @@ xbm_load (struct frame *f, struct image *img) | |||
| 3110 | int nbytes, i; | 3110 | int nbytes, i; |
| 3111 | /* Windows mono bitmaps are reversed compared with X. */ | 3111 | /* Windows mono bitmaps are reversed compared with X. */ |
| 3112 | invertedBits = bits; | 3112 | invertedBits = bits; |
| 3113 | nbytes = (img->width + CHAR_BIT - 1) / CHAR_BIT; | 3113 | nbytes = (img->width + CHAR_BIT - 1) / CHAR_BIT * img->height; |
| 3114 | SAFE_NALLOCA (bits, nbytes, img->height); | 3114 | SAFE_NALLOCA (bits, 1, nbytes); |
| 3115 | for (i = 0; i < nbytes; i++) | 3115 | for (i = 0; i < nbytes; i++) |
| 3116 | bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]); | 3116 | bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]); |
| 3117 | } | 3117 | } |