[comp.windows.x] Bug in Xv10R4 xwd

wyatt@cfa.harvard.EDU (Bill Wyatt) (06/21/88)

This is probably not a burning issue, but if anyone uses the v10R4
`xwd' to dump *color* windows somewhere, then I've found a bug you
need to fix. 

The declaration `register char *buffer' in the initial variable list
needs to be changed to `register unsigned char *buffer'. You also
should cast an assignment to this pointer from `calloc', somewhat
later. 

This only becomes a problem in color dumps, as the value from buffer
is used to index another array in order to find out how many colors
are in use. If the color is >127, the old code's value is negative, 
and the program bombs. 
-- 

Bill    UUCP:  {husc6,ihnp4,cmcl2,mit-eddie}!harvard!cfa!wyatt
Wyatt   ARPA:  wyatt@cfa.harvard.edu
         (or)  wyatt%cfa@harvard.harvard.edu
      BITNET:  wyatt@cfa2
        SPAN:  cfairt::wyatt