From patchwork Wed Jul 7 18:57:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 58161 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 8835B1007D1 for ; Thu, 8 Jul 2010 05:58:44 +1000 (EST) Received: from localhost ([127.0.0.1]:56308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWaCq-00054J-Vf for incoming@patchwork.ozlabs.org; Wed, 07 Jul 2010 15:22:53 -0400 Received: from [140.186.70.92] (port=34973 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWZog-000872-PK for qemu-devel@nongnu.org; Wed, 07 Jul 2010 14:58:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWZob-0002fT-W2 for qemu-devel@nongnu.org; Wed, 07 Jul 2010 14:57:54 -0400 Received: from iksaif.net ([88.191.73.63]:35188) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWZob-0002ek-Qw for qemu-devel@nongnu.org; Wed, 07 Jul 2010 14:57:49 -0400 Received: from falgoret.iksaif.net (localhost [127.0.0.1]) (Authenticated sender: corentincj@iksaif.net) by iksaif.net (Postfix) with ESMTPA id 5AA6EC9006D; Wed, 7 Jul 2010 20:58:14 +0200 (CEST) From: Corentin Chary To: qemu-devel@nongnu.org Date: Wed, 7 Jul 2010 20:57:54 +0200 Message-Id: <1278529086-10391-7-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1278529086-10391-1-git-send-email-corentincj@iksaif.net> References: <1278529086-10391-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 Subject: [Qemu-devel] [PATCH v2 06/18] vnc: tight: don't forget do at the last 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 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]; \ } \ } \ \