# HG changeset patch # User oc # Date 1403691557 -32400 # Node ID 6aa1c0f4ab2eef99e16e4ab96b49fb727a2f2631 # Parent f381159e38f31143843fbfccae9d585dc994bc82 fix readSendData. diff -r f381159e38f3 -r 6aa1c0f4ab2e src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java --- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java Wed Jun 25 19:09:27 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java Wed Jun 25 19:19:17 2014 +0900 @@ -23,11 +23,11 @@ FramebufferUpdateRectangle rect) throws TransportException { // TreeVNC handling int dataLen = getZrleLength(rect, reader); + byte[] bytes = new byte[rect.width * rect.height * renderer.getBytesPerPixel()]; reader.reset(); if (rfb.hasViewer()) { ZRLEDecoder decoder = new ZRLEDecoder(); if (rfb.isRoot()) { - byte[] bytes = new byte[rect.width * rect.height * renderer.getBytesPerPixel()]; rfb.readSendData(dataLen, reader, bytes); decoder.decode1(renderer, rect, bytes, 0); return; @@ -39,7 +39,7 @@ return; } } - rfb.readSendData(dataLen, reader, null); + rfb.readSendData(dataLen, reader, bytes); } private int getZrleLength(FramebufferUpdateRectangle rect, Reader reader)