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

Comparing ray/src/common/readobj.c (file contents):
Revision 2.23 by greg, Sat May 4 00:36:58 2019 UTC vs.
Revision 2.24 by greg, Sat Oct 17 16:39:23 2020 UTC

# Line 198 | Line 198 | freeobjects(                           /* free a range of objects */
198                  freefargs(&o->oargs);
199                  memset((void *)o, '\0', sizeof(OBJREC));
200          }
201        clearobjndx();
201                                          /* free objects off end */
202          for (obj = nobjects; obj-- > 0; )
203                  if (objptr(obj)->oname != NULL)
204                          break;
205 <        ++obj;
205 >        if (++obj >= nobjects)
206 >                return;
207          while (nobjects > obj)          /* free empty end blocks */
208                  if ((--nobjects & (OBJBLKSIZ-1)) == 0) {
209                          int     i = nobjects >> OBJBLKSHFT;
210                          free((void *)objblock[i]);
211                          objblock[i] = NULL;
212                  }
213 +        truncobjndx();                  /* truncate modifier look-up */
214   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines