From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51033 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHWTi-0001yP-UL for qemu-devel@nongnu.org; Thu, 27 May 2010 02:22:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHWTh-0001p8-K0 for qemu-devel@nongnu.org; Thu, 27 May 2010 02:22:02 -0400 Received: from iksaif.net ([88.191.73.63]:43712) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHWTh-0001ol-Es for qemu-devel@nongnu.org; Thu, 27 May 2010 02:22:01 -0400 From: Corentin Chary Date: Thu, 27 May 2010 08:21:53 +0200 Message-Id: <1274941314-7493-2-git-send-email-corentincj@iksaif.net> In-Reply-To: <1274253852-16068-1-git-send-email-corentincj@iksaif.net> References: <1274253852-16068-1-git-send-email-corentincj@iksaif.net> Subject: [Qemu-devel] [PATCH 2/3] vnc: tight: don't forget the third 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 couting color, if the third color was only present one time it wasn't added to the palette. Signed-off-by: Corentin Chary --- vnc-encoding-tight.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vnc-encoding-tight.c b/vnc-encoding-tight.c index c8effe6..efb57e7 100644 --- a/vnc-encoding-tight.c +++ b/vnc-encoding-tight.c @@ -177,6 +177,7 @@ static int tight_palette_insert(QDict *palette, uint32_t rgb, int bpp, int max) *palette = qdict_new(); \ tight_palette_insert(*palette, c0, bpp, max); \ tight_palette_insert(*palette, c1, bpp, max); \ + tight_palette_insert(*palette, ci, bpp, max); \ \ for (i++; i < count; i++) { \ if (data[i] == ci) { \ -- 1.7.1