]> source.dussan.org Git - tigervnc.git/commitdiff
Don't forget the highest byte when reading out pixels.
authorPierre Ossman <ossman@cendio.se>
Mon, 9 Mar 2009 09:52:54 +0000 (09:52 +0000)
committerPierre Ossman <ossman@cendio.se>
Mon, 9 Mar 2009 09:52:54 +0000 (09:52 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3641 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/PixelFormat.inl

index faffc6588cf73b4f1ec0b75968ff41187c69cb3b..d5edfa5501490c8ae2f2715a0977b8c0feafd9a7 100644 (file)
@@ -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;
+      }
     }
   }