diff options
| -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 | } |