When a selection containing no more than 256 distinct colors is copied from a 24-bit image, xv uses 8-bit color on the clipboard, presumably in order to optimize clipboard size if the selection is large. This patch fixes a bug that was causing the colormap it constructs to be stored one place off the correct position in the data structure. Signed-off-by: Mark Brader Acked-by: Gabriel Somlo diff -NarU5 a/xvcut.c b/xvcut.c --- a/xvcut.c 2013-03-28 12:36:30.515468841 -0400 +++ b/xvcut.c 2013-03-28 12:37:34.639145150 -0400 @@ -676,13 +676,13 @@ for (k=0; k