Browse Source

vnc: tight: don't forget the third color

While couting color, if the third color was only present one
time it wasn't added to the palette.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
stable-0.13
Corentin Chary 16 years ago
committed by Anthony Liguori
parent
commit
270ec21929
  1. 1
      vnc-encoding-tight.c

1
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) { \

Loading…
Cancel
Save