From: Corentin Chary Date: Wed, 7 Jul 2010 18:57:54 +0000 (+0200) Subject: vnc: tight: don't forget do at the last color X-Git-Tag: xen-15-06-02~7209 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5d8efe39a2e2f9479da1aefefa7325a1e7cb630b;p=people%2Fsstabellini%2Fqemu-dm.git%2F.git vnc: tight: don't forget do at the last color While using indexed colors, the last color was never added to the palette. Triggered with ubuntu livecd. Signed-off-by: Corentin Chary Signed-off-by: Anthony Liguori --- diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 358221dc06..ade8e5f846 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]; \ } \ } \ \