]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix fringe bitmap initialization on MS-Windows
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sun, 19 Feb 2017 04:42:05 +0000 (13:42 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sun, 19 Feb 2017 04:42:05 +0000 (13:42 +0900)
* src/fringe.c (init_fringe_bitmap) [HAVE_NTGUI]: Fix initialization
of fb->bits.  (Bug#25673)

src/fringe.c

index c41a5d3f5e37d7ce46d193a2e72186a69a565547..dbcd52be058d8e2a3d2cce69e8714b74229bdc60 100644 (file)
@@ -1449,6 +1449,19 @@ init_fringe_bitmap (int which, struct fringe_bitmap *fb, int once_p)
 #endif /* not USE_CAIRO */
 #endif /* HAVE_X_WINDOWS */
 
+#ifdef HAVE_NTGUI
+      unsigned short *bits = fb->bits;
+      int j;
+      for (j = 0; j < fb->height; j++)
+       {
+         unsigned short b = *bits;
+         b <<= (16 - fb->width);
+#ifndef WORDS_BIGENDIAN
+         b = ((b >> 8) | (b << 8));
+#endif
+         *bits++ = b;
+       }
+#endif
     }
 
   if (!once_p)