changeset 598:27449453ebde

fix error (should be abandon this update)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 14 Feb 2020 10:32:15 +0900
parents e7748e46acad
children 3b8de13a9c16
files src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java	Fri Feb 14 09:41:44 2020 +0900
+++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java	Fri Feb 14 10:32:15 2020 +0900
@@ -328,8 +328,10 @@
 				for (int tileX = rect.x; tileX < maxX; tileX += MAX_TILE_SIZE) {
 					int tileWidth = Math.min(maxX - tileX, MAX_TILE_SIZE);
 					int subencoding = bytes[offset++] & 0x0ff;
-					if (subencoding != 0)
+					if (subencoding != 0) {
 						System.out.println("----------------" + subencoding);
+						throw new TransportException("Bad subencoding",null);
+					}
 					// 128 -plain RLE, 130-255 - Palette RLE
 					boolean isRle = (subencoding & 128) != 0;
 					// 2 to 16 for raw packed palette data, 130 to 255 for Palette RLE (subencoding - 128)
@@ -359,8 +361,6 @@
 				tileloop.multicastPut(rfbProto, true, bytes, offset, 0, 0);
 		} catch (Exception e) {
 			e.printStackTrace();
-			if (rfbProto != null && rfbProto.multicastBlocking)
-				tileloop.multicastPut(rfbProto, true, bytes, offset, 0, 0);
 			throw e;
 		}
 	}