Mercurial > hg > Applications > TreeVNC
changeset 183:6f452c497e0e
fix readSendData.
author | oc |
---|---|
date | Mon, 23 Jun 2014 20:37:58 +0900 |
parents | b3426724667b |
children | 032b1bcc6ab4 |
files | src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java Mon Jun 23 19:30:51 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java Mon Jun 23 20:37:58 2014 +0900 @@ -23,7 +23,7 @@ FramebufferUpdateRectangle rect) throws TransportException { int dataLen = getZrleLength(rect, reader); reader.reset(); - byte[] bytes = new byte[dataLen]; + byte[] bytes = new byte[rect.width * rect.height * renderer.getBytesPerPixel()]; // TreeVNC handling rfb.readSendData(dataLen, reader, bytes); // reader is reseted read again @@ -36,10 +36,10 @@ reader.readByte();// message reader.readByte();// padding reader.readUInt16();// numberOfRectangle - rect.fill(reader);// fill + reader.skypBytes(12); ZRLEDecoder decoder = new ZRLEDecoder(); if (rfb.isRoot()) - decoder.decode1(reader, renderer, rect, bytes, dataLen); + decoder.decode1(reader, renderer, rect, bytes, 0); else if (!rfb.getCuiVersion()) decoder.decode(reader, renderer, rect); else {