summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/rfb/PixelFormat.cxx2
1 files changed, 1 insertions, 1 deletions
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_--) {