]> source.dussan.org Git - tigervnc.git/commitdiff
Wrong padding size calculated (copy-paste error) 46/head
authorPierre Ossman <ossman@cendio.se>
Thu, 9 Oct 2014 14:57:21 +0000 (16:57 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 9 Oct 2014 14:57:21 +0000 (16:57 +0200)
common/rfb/PixelFormat.cxx

index 9ec6b469e611509a500cb1e7651bfd989274e622..76051dc449d0b3d82eaff692c16fd1acb4d269af 100644 (file)
@@ -260,7 +260,7 @@ void PixelFormat::bufferFromRGB(rdr::U8 *dst, const rdr::U8* src,
     }
   } else {
     // Generic code
-    int dstPad = (stride - w) * 4;
+    int dstPad = (stride - w) * bpp/8;
     while (h--) {
       int w_ = w;
       while (w_--) {