ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cnt.c
(Generate patch)

Comparing ray/src/cal/cnt.c (file contents):
Revision 1.6 by greg, Thu Apr 21 02:52:40 2022 UTC vs.
Revision 1.7 by greg, Fri Apr 22 15:50:34 2022 UTC

# Line 161 | Line 161 | incr_counter(uby8 *ctrp, int n)
161   {
162          n = tree_br[n].cntr_siz;
163  
164 <        while (n-- > 0)                 /* LSB first */
165 <                if (++(*ctrp++))
166 <                        break;
164 >        while (++(*ctrp++))             /* LSB first */
165 >                if (--n <= 0) {
166 >                        fputs("Shuffle occupancy overflow!\n", stderr);
167 >                        exit(1);        /* means we sized something wrong */
168 >                }
169   }
170  
171  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines