--- ray/src/rt/colortab.c 2014/07/08 18:24:59 2.11 +++ ray/src/rt/colortab.c 2016/03/18 22:52:05 2.12 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: colortab.c,v 2.11 2014/07/08 18:24:59 greg Exp $"; +static const char RCSid[] = "$Id: colortab.c,v 2.12 2016/03/18 22:52:05 schorsch Exp $"; #endif /* * colortab.c - allocate and control dynamic color table. @@ -116,9 +116,9 @@ get_pixel( /* get pixel for color */ /* find pixel in tree */ for (tp = ctree, h = 0; is_branch(*tp); h++) if (cv[prim(*tp)] < part(*tp)) - tp += 1<>1); + cut(tree+((size_t)1<>1); /* do right branch */ kb[prim(*tree)][0] = part(*tree); kb[prim(*tree)][1] = box[prim(*tree)][1]; - cut(tree+(1<<(level+1)), level+1, kb, (c0+c1)>>1, c1); + cut(tree+((size_t)1<<(level+1)), level+1, kb, (c0+c1)>>1, c1); }