From 5d8efe39a2e2f9479da1aefefa7325a1e7cb630b Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Wed, 7 Jul 2010 20:57:54 +0200 Subject: [PATCH] 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 --- ui/vnc-enc-tight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; \ } \ } \ \ -- 2.11.0