summaryrefslogtreecommitdiffstats
path: root/libvncclient/rfbproto.c
diff options
context:
space:
mode:
authordscho <dscho>2004-06-15 10:33:26 +0000
committerdscho <dscho>2004-06-15 10:33:26 +0000
commitd1975049162df0e1e4dcb36a0ac470b08df9cec8 (patch)
tree0cd58006bc4ee2eb5f7809fa573d4a7174821dd0 /libvncclient/rfbproto.c
parentf868d56ef15e5c2a9d9932107174cfa4e88dbea6 (diff)
downloadlibtdevnc-d1975049162df0e1e4dcb36a0ac470b08df9cec8.tar.gz
libtdevnc-d1975049162df0e1e4dcb36a0ac470b08df9cec8.zip
fix silly update bug with raw encoding
Diffstat (limited to 'libvncclient/rfbproto.c')
-rw-r--r--libvncclient/rfbproto.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c
index bb2d7a4..235708e 100644
--- a/libvncclient/rfbproto.c
+++ b/libvncclient/rfbproto.c
@@ -728,26 +728,27 @@ HandleRFBServerMessage(rfbClient* client)
switch (rect.encoding) {
- case rfbEncodingRaw:
+ case rfbEncodingRaw: {
+ int y=rect.r.y, h=rect.r.h;
bytesPerLine = rect.r.w * client->format.bitsPerPixel / 8;
linesToRead = BUFFER_SIZE / bytesPerLine;
- while (rect.r.h > 0) {
- if (linesToRead > rect.r.h)
- linesToRead = rect.r.h;
+ while (h > 0) {
+ if (linesToRead > h)
+ linesToRead = h;
if (!ReadFromRFBServer(client, client->buffer,bytesPerLine * linesToRead))
return FALSE;
CopyRectangle(client, client->buffer,
- rect.r.x, rect.r.y, rect.r.w,linesToRead);
+ rect.r.x, y, rect.r.w,linesToRead);
- rect.r.h -= linesToRead;
- rect.r.y += linesToRead;
+ h -= linesToRead;
+ y += linesToRead;
}
- break;
+ } break;
case rfbEncodingCopyRect:
{