From 07b6f857d78fc63269dcc7040562b81c3d116397 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Thu, 20 Aug 2015 20:31:16 +0000 Subject: [PATCH] VNC Viewer: fixed bug in TRLE palette encodings. git-svn-id: svn://kolibrios.org@5756 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/vncc/trle.inc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/programs/network/vncc/trle.inc b/programs/network/vncc/trle.inc index d211ce3d8f..411ff7b3e9 100644 --- a/programs/network/vncc/trle.inc +++ b/programs/network/vncc/trle.inc @@ -299,6 +299,13 @@ encoding_TRLE: .palette_1bit_line: mov ebx, [subrectangle.width] .palette_1bit_byte: + @@: + lea eax, [esi+1] + cmp [datapointer], eax + jae @f + call read_data.more + jmp @b + @@: lodsb rol al, 1 mov ecx, eax @@ -392,6 +399,13 @@ encoding_TRLE: .palette_2bit_line: mov ebx, [subrectangle.width] .palette_2bit_byte: + @@: + lea eax, [esi+1] + cmp [datapointer], eax + jae @f + call read_data.more + jmp @b + @@: lodsb mov ecx, eax and eax, 0xc0 @@ -444,6 +458,13 @@ encoding_TRLE: .palette_4bit_line: mov ebx, [subrectangle.width] .palette_4bit_byte: + @@: + lea eax, [esi+1] + cmp [datapointer], eax + jae @f + call read_data.more + jmp @b + @@: lodsb mov cl, al and eax, 0xf0