diff options
Diffstat (limited to 'krdc/vnc')
-rw-r--r-- | krdc/vnc/rfbproto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/krdc/vnc/rfbproto.c b/krdc/vnc/rfbproto.c index c6e05c05..a178ed6f 100644 --- a/krdc/vnc/rfbproto.c +++ b/krdc/vnc/rfbproto.c @@ -987,7 +987,7 @@ HandleRFBServerMessage() /* Regardless of cause, do not divide by zero. */ linesToRead = bytesPerLine ? (BUFFER_SIZE / bytesPerLine) : 0; - while (rect.r.h > 0) { + while (linesToRead && rect.r.h > 0) { if (linesToRead > rect.r.h) linesToRead = rect.r.h; |