From patchwork Tue Jun 1 21:05:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 54314 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A1B0FB7D1C for ; Wed, 2 Jun 2010 07:08:18 +1000 (EST) Received: from localhost ([127.0.0.1]:60483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJYh4-0000sD-JU for incoming@patchwork.ozlabs.org; Tue, 01 Jun 2010 17:08:14 -0400 Received: from [140.186.70.92] (port=46432 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJYeW-00009K-NI for qemu-devel@nongnu.org; Tue, 01 Jun 2010 17:05:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJYeV-0006hI-1K for qemu-devel@nongnu.org; Tue, 01 Jun 2010 17:05:36 -0400 Received: from iksaif.net ([88.191.73.63]:56781) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJYeU-0006h4-Pa for qemu-devel@nongnu.org; Tue, 01 Jun 2010 17:05:34 -0400 Received: from tartiflon (lal69-3-82-241-209-44.fbx.proxad.net [82.241.209.44]) (Authenticated sender: corentincj@iksaif.net) by iksaif.net (Postfix) with ESMTPA id 371B8C9003B; Tue, 1 Jun 2010 23:09:36 +0200 (CEST) From: Corentin Chary To: qemu-devel@nongnu.org Date: Tue, 1 Jun 2010 23:05:43 +0200 Message-Id: <1275426344-26549-3-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1275426344-26549-1-git-send-email-corentincj@iksaif.net> References: <1275426344-26549-1-git-send-email-corentincj@iksaif.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Corentin Chary , Anthony Liguori , Alexander Graf , Adam Litke Subject: [Qemu-devel] [PATCH 2/3] vnc: tight: don't forget the third color X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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) { \