From 67e7b29e3361005be2c1b5a9f9df4c811812e63f Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 9 Mar 2009 09:52:54 +0000 Subject: [PATCH] Don't forget the highest byte when reading out pixels. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3641 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/rfb/PixelFormat.inl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/rfb/PixelFormat.inl b/common/rfb/PixelFormat.inl index faffc658..d5edfa55 100644 --- a/common/rfb/PixelFormat.inl +++ b/common/rfb/PixelFormat.inl @@ -39,8 +39,10 @@ inline Pixel PixelFormat::pixelFromBuffer(const rdr::U8* buffer) const p |= buffer[0]; if (bpp >= 16) { p |= ((Pixel)buffer[1]) << 8; - if (bpp == 32) + if (bpp == 32) { p |= ((Pixel)buffer[2]) << 16; + p |= ((Pixel)buffer[3]) << 24; + } } } -- 2.39.5