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

Comparing ray/src/common/modobject.c (file contents):
Revision 2.19 by greg, Sat Oct 17 17:48:46 2020 UTC vs.
Revision 2.20 by greg, Mon Feb 1 17:36:45 2021 UTC

# Line 29 | Line 29 | objndx(                                /* get object number from pointer */
29          OBJREC  *op
30   )
31   {
32 <        int  i, j;
32 >        int     i;
33 >        long    j;
34  
35 <        for (i = nobjects>>OBJBLKSHFT; i >= 0; i--) {
35 >        for (i = (nobjects-1)>>OBJBLKSHFT; i >= 0; i--) {
36                  j = op - objblock[i];
37                  if ((j >= 0) & (j < OBJBLKSIZ))
38 <                        return((i<<OBJBLKSHFT) + j);
38 >                        return(((OBJECT)i<<OBJBLKSHFT) + (OBJECT)j);
39          }
40          return(OVOID);
41   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines