Comment where the mysterious 0xFFFF number of rectangles comes from.
Patch by Arthur Huillet.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4858 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index deec186..1ecd78c 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -1083,6 +1083,10 @@
       if (i->width() && i->height()) {
         int nUpdateRects = writer()->getNumRects(*i);
         if (nUpdateRects == 0 && cp.currentEncoding() == encodingTight) {
+          // With Tight encoding and LastRect support, the client does not
+          // care about the number of rectangles in the update - it will
+          // stop parsing when it encounters a LastRect "rectangle".
+          // In this case, pretend to send 65535 rectangles.
           nRects = 0xFFFF;  break;
         }
         else