Mercurial > hg > Applications > tvnjviewer
changeset 12:0415badf417f
bug fix (ArrayIndexOutOfBoundsException)
author | YU |
---|---|
date | Tue, 23 Sep 2014 16:23:44 +0900 |
parents | f9e319a08111 |
children | 49dbbb3f4710 |
files | src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java |
diffstat | 1 files changed, 2 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Tue Sep 23 16:21:11 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Tue Sep 23 16:23:44 2014 +0900 @@ -46,14 +46,13 @@ AliceVNCMessage message = new AliceVNCMessage(); message.setRectangle(rect); - message.unzip = bytes; + message.buf = bytes.clone(); message.offset = offset; DataSegment.getLocal().put("aliceVNCMessage", message); - setColorDataOnRenderer(renderer, rect, bytes, offset); } - private void setColorDataOnRenderer(Renderer renderer, + public void setColorDataOnRenderer(Renderer renderer, FramebufferUpdateRectangle rect, byte[] bytes, int offset) throws TransportException { int maxX = rect.x + rect.width; @@ -178,15 +177,4 @@ } return paletteSize * bytesPerCPixel; } - - public void decode(AliceVNCMessage message, Renderer renderer) throws TransportException { - - FramebufferUpdateRectangle rect = new FramebufferUpdateRectangle( - message.x, message.y, message.width, message.height); - - byte[] bytes = message.unzip; - int offset = message.offset; - setColorDataOnRenderer(renderer, rect, bytes, offset); - - } }