From 4e8231f3a10834f0e47db9661abc670c2183c5e6 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 25 Apr 2009 00:26:34 +0000 Subject: [PATCH] (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]: Swap bytes in short integer if fringe bitmap width > 8. --- src/ChangeLog | 5 +++++ src/fringe.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index c87aeb182ee..ccd678ff8bf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-04-25 YAMAMOTO Mitsuharu + + * fringe.c (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]: + Swap bytes in short integer if fringe bitmap width > 8. + 2009-04-23 Kenichi Handa * xfaces.c (Fx_list_fonts): If a font size is specified in 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 */ -- 2.39.2