--- ray/src/px/closest.c 2003/02/22 02:07:27 2.2 +++ ray/src/px/closest.c 2003/07/27 22:12:03 2.3 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: closest.c,v 2.2 2003/02/22 02:07:27 greg Exp $"; +static const char RCSid[] = "$Id: closest.c,v 2.3 2003/07/27 22:12:03 schorsch Exp $"; #endif /* CLOSEST - nearest-color lookup by locally ordered search @@ -77,9 +77,9 @@ int k; /* matches for colors in bucket #k */ if (!sq[0]) for (j= -255; j<256; j++) sq[j+255] = j*j; - r = k>>1&0xe0|H; /* center of 32x32x32 cubical bucket */ - g = k<<2&0xe0|H; - b = k<<5&0xe0|H; + r = (k>>1&0xe0)|H; /* center of 32x32x32 cubical bucket */ + g = (k<<2&0xe0)|H; + b = (k<<5&0xe0)|H; rsq = sq+255-r; gsq = sq+255-g; bsq = sq+255-b;