# HG changeset patch # User Shinji KONO # Date 1581512080 -32400 # Node ID ef5033b06019cc245a178f529d9a9c32d52b2888 # Parent f01eef88010f5276de0ab4d1d286d55a4c9db0d3 fix compress length in flush diff -r f01eef88010f -r ef5033b06019 src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java --- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Sat Feb 08 10:34:46 2020 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Wed Feb 12 21:54:40 2020 +0900 @@ -250,7 +250,7 @@ c1.putShort(prevC1Offset - 12, (short) rect.width); c1.putShort(prevC1Offset - 10, (short) rect.height); c1.putInt(prevC1Offset - 8, EncodingType.ZRLEE.getId()); - c1.putInt(prevC1Offset - 4, c1.position() - prevC1Offset - 12); // data length + c1.putInt(prevC1Offset - 4, c1.position() - prevC1Offset ); // data length c1.putShort(2, (short) (c1.getShort(2) + 1)); // increment rectangle count prevC1Offset = c1.position(); } diff -r f01eef88010f -r ef5033b06019 src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java --- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Sat Feb 08 10:34:46 2020 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Wed Feb 12 21:54:40 2020 +0900 @@ -418,7 +418,7 @@ } dump("in ",bytes,flushOffset,8); dump("... ",bytes,flushEnd-8,8); System.out.println(); - dump("out ",buf.array(),buf.position(),8); dump(" ",buf.array(),buf.limit()-8,8); + dump("out ",buf.array(),buf.position(),8); dump("... ",buf.array(),buf.limit()-8,8); System.out.println(); }