diff options
author | Petr Mladek <pmladek@suse.cz> | 2011-02-15 14:17:24 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-02-15 14:17:24 +0100 |
commit | aab96bf8f5686506e26351e646269f2ec1efb0dc (patch) | |
tree | 33d6be3a301ca365291bf0b74073ac5442b38930 /desktop/unx/source/splashx.c | |
parent | 1e50f0289a3024879aff7773b4bfbe62910504fd (diff) |
crashing oosplash and malformed picture (bnc#652562)
it was visible only on screens that did not use 32bpp
Signed-off-by: Thorsten Behrens <thb@documentfoundation.org>
Signed-off-by: Michael Meeks <michael.meeks@novell.com>
Signed-off-by: Jan Holesovsky <kendy@suse.cz>
Diffstat (limited to 'desktop/unx/source/splashx.c')
-rw-r--r-- | desktop/unx/source/splashx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c index 6e7088b42ca4..1c6ab45225f6 100644 --- a/desktop/unx/source/splashx.c +++ b/desktop/unx/source/splashx.c @@ -333,6 +333,7 @@ static void create_pixmap() int x, y; \ for ( y = 0; y < height; ++y ) \ { \ + out = data + y * bytes_per_line; \ unsigned long red_delta = 0, green_delta = 0, blue_delta = 0; \ color_t *in = (color_t *)bitmap_rows[y]; \ for ( x = 0; x < width; ++x, ++in ) \ @@ -376,7 +377,7 @@ static void create_pixmap() { if ( machine_byte_order == byte_order && byte_order == LSBFirst ) COPY_IN_OUT( 3, *( (color_t *)out ) = *( (color_t *)( &pixel ) ); out += 3; ) - if ( machine_byte_order == byte_order && byte_order == MSBFirst ) + else if ( machine_byte_order == byte_order && byte_order == MSBFirst ) COPY_IN_OUT( 3, uint32_t tmp = pixel; *( (uint8_t *)out ) = *( (uint8_t *)(&tmp) + 1 ); *( (uint8_t *)out + 1 ) = *( (uint8_t *)(&tmp) + 2 ); |