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.20 by greg, Mon Feb 1 17:36:45 2021 UTC vs.
Revision 2.21 by greg, Fri Dec 6 20:30:15 2024 UTC

# Line 30 | Line 30 | objndx(                                /* get object number from pointer */
30   )
31   {
32          int     i;
33 <        long    j;
33 >        ssize_t j;
34  
35          for (i = (nobjects-1)>>OBJBLKSHFT; i >= 0; i--) {
36                  j = op - objblock[i];
37 <                if ((j >= 0) & (j < OBJBLKSIZ))
37 >                if ((0 <= j) & (j < OBJBLKSIZ))
38                          return(((OBJECT)i<<OBJBLKSHFT) + (OBJECT)j);
39          }
40 <        return(OVOID);
40 >        return(OVOID);          /* not in our array -- may still be valid */
41   }
42  
43  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines