summaryrefslogtreecommitdiff
path: root/src/fringe.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2009-04-25 00:26:34 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2009-04-25 00:26:34 +0000
commit4e8231f3a10834f0e47db9661abc670c2183c5e6 (patch)
tree208867dfb1f5ed5c5473c6929a9d351630a8ea31 /src/fringe.c
parent65a099b6797eee713cb535ff4ed9d705863f5055 (diff)
downloademacs-4e8231f3a10834f0e47db9661abc670c2183c5e6.tar.gz
(init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]:
Swap bytes in short integer if fringe bitmap width > 8.
Diffstat (limited to 'src/fringe.c')
-rw-r--r--src/fringe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fringe.c b/src/fringe.c
index 9b592414532..41fc24d1150 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1369,7 +1369,11 @@ init_fringe_bitmap (which, fb, once_p)
| (swap_nibble[(b>>4) & 0xf] << 8)
| (swap_nibble[(b>>8) & 0xf] << 4)
| (swap_nibble[(b>>12) & 0xf]));
- *bits++ = (b >> (16 - fb->width));
+ b >>= (16 - fb->width);
+#ifdef WORDS_BIG_ENDIAN
+ b = ((b >> 8) | (b << 8));
+#endif
+ *bits++ = b;
}
}
#endif /* HAVE_X_WINDOWS */