summaryrefslogtreecommitdiffstats
path: root/ui/vnc-enc-tight.c
diff options
context:
space:
mode:
authorCorentin Chary2010-07-07 20:57:54 +0200
committerAnthony Liguori2010-07-27 00:36:14 +0200
commit5d8efe39a2e2f9479da1aefefa7325a1e7cb630b (patch)
treed93e10e842a278ada0b7c5460d56cce34aa32f2e /ui/vnc-enc-tight.c
parentvnc: rename vnc-encoding-* vnc-enc-* (diff)
downloadqemu-5d8efe39a2e2f9479da1aefefa7325a1e7cb630b.tar.gz
qemu-5d8efe39a2e2f9479da1aefefa7325a1e7cb630b.tar.xz
qemu-5d8efe39a2e2f9479da1aefefa7325a1e7cb630b.zip
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 <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/vnc-enc-tight.c')
-rw-r--r--ui/vnc-enc-tight.c2
1 files changed, 1 insertions, 1 deletions
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]; \
} \
} \
\