# HG changeset patch # User Shinji KONO # Date 1581569014 -32400 # Node ID 32c104c11767d842636f3158e8e02b49cfd791f8 # Parent 415fd7dd09f0fd160d4aa66934265975ceb2d53f fix check routine loop diff -r 415fd7dd09f0 -r 32c104c11767 src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java --- 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(); }