Received: from [140.186.70.92] (port=34433 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLVV3-0003Lu-4K for qemu-devel@nongnu.org; Mon, 07 Jun 2010 02:07:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLVUx-0002fn-9p for qemu-devel@nongnu.org; Mon, 07 Jun 2010 02:07:52 -0400 Received: from iksaif.net ([88.191.73.63]:54691) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLVUx-0002fQ-5V for qemu-devel@nongnu.org; Mon, 07 Jun 2010 02:07:47 -0400 From: Corentin Chary Date: Mon, 7 Jun 2010 08:08:09 +0200 Message-Id: <1275890889-13349-7-git-send-email-corentincj@iksaif.net> In-Reply-To: <1275890889-13349-1-git-send-email-corentincj@iksaif.net> References: <1275890889-13349-1-git-send-email-corentincj@iksaif.net> Subject: [Qemu-devel] [PATCH v2 6/6] vnc: tight: don't forget to add 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 , Adam Litke 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 6db5570..77fcdf7 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -395,11 +395,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