Mercurial > hg > Applications > TreeVNC
changeset 593:32c104c11767
fix check routine loop
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 13 Feb 2020 13:43:34 +0900 |
parents | 415fd7dd09f0 |
children | 2ff55462c12d |
files | src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Thu Feb 13 07:50:33 2020 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Thu Feb 13 13:43:34 2020 +0900 @@ -386,13 +386,15 @@ int numberOfRectangeles = in.readInt16(); if (true) { in.mark(c1.limit() - 4); - rect.fill(in); - if (rect.getEncodingType() == EncodingType.ZRLEE ) { - int length = rect.width * rect.height * renderer.getBytesPerPixel(); - int zippedLength = (int) in.readUInt32(); - ZRLEDecoder decoder = new ZRLEDecoder(); - ByteBuffer buf = decoder.unzip(in, zippedLength, length, rect.getEncodingType()); - compareBytes(buf, bytes, flushOffset, flushEnd); + while(numberOfRectangeles-- > 0 ) { + rect.fill(in); + if (rect.getEncodingType() == EncodingType.ZRLEE) { + int length = rect.width * rect.height * renderer.getBytesPerPixel(); + int zippedLength = (int) in.readUInt32(); + ZRLEDecoder decoder = new ZRLEDecoder(); + ByteBuffer buf = decoder.unzip(in, zippedLength, length, rect.getEncodingType()); + compareBytes(buf, bytes, flushOffset, flushEnd); + } } in.reset(); }