The source data here is RGB triplets, not "pixels".


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4785 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/tightDecode.h b/common/rfb/tightDecode.h
index 2c5f7e4..e604e0e 100644
--- a/common/rfb/tightDecode.h
+++ b/common/rfb/tightDecode.h
@@ -138,11 +138,9 @@
   int dataSize = r.height() * rowSize;
   int streamId = -1;
   rdr::InStream *input;
-  bool useZlib = false;
   if (dataSize < TIGHT_MIN_TO_COMPRESS) {
     input = is;
   } else {
-    useZlib = true;
     int length = is->readCompactLength();
     streamId = comp_ctl & 0x03;
     zis[streamId].setUnderlying(is, length);
@@ -182,7 +180,7 @@
         while (h > 0) {
           serverpf.bufferFromRGB((rdr::U8*)ptr, srcPtr, w, NULL);
           ptr += stride;
-          srcPtr += w * sizeof(PIXEL_T);
+          srcPtr += w * 3;
           h--;
         }
       } else {