From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53253 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOlqv-0001q5-Lz for qemu-devel@nongnu.org; Wed, 16 Jun 2010 02:12:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOlqu-000310-1d for qemu-devel@nongnu.org; Wed, 16 Jun 2010 02:11:57 -0400 Received: from iksaif.net ([88.191.73.63]:35948) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOlqt-00030f-TU for qemu-devel@nongnu.org; Wed, 16 Jun 2010 02:11:56 -0400 From: Corentin Chary Date: Wed, 16 Jun 2010 09:12:03 +0200 Message-Id: <1276672333-14831-7-git-send-email-corentincj@iksaif.net> In-Reply-To: <1276672333-14831-1-git-send-email-corentincj@iksaif.net> References: <1276672333-14831-1-git-send-email-corentincj@iksaif.net> Subject: [Qemu-devel] [PATCH 06/16] vnc: tight: don't forget do at the last color List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Corentin Chary , Anthony Liguori , Alexander Graf While using indexed colors, the last color was never added to the palette. Triggered with ubuntu livecd. Signed-off-by: Corentin Chary --- ui/vnc-enc-tight.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 358221d..ade8e5f 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -393,11 +393,11 @@ static int tight_palette_insert(QDict *palette, uint32_t rgb, int bpp, int max) if (data[i] == ci) { \ continue; \ } else { \ + ci = data[i]; \ if (!tight_palette_insert(*palette, (uint32_t)ci, \ bpp, max)) { \ return 0; \ } \ - ci = data[i]; \ } \ } \ \ -- 1.7.1