From 9b6d80dbd1cb5c6d1a4e4b896c0a898dadc831b2 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 9 Oct 2014 16:57:21 +0200 Subject: [PATCH] Wrong padding size calculated (copy-paste error) --- common/rfb/PixelFormat.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rfb/PixelFormat.cxx b/common/rfb/PixelFormat.cxx index 9ec6b469..76051dc4 100644 --- a/common/rfb/PixelFormat.cxx +++ b/common/rfb/PixelFormat.cxx @@ -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_--) { -- 2.39.5