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

Comparing ray/src/cv/bsdfrep.c (file contents):
Revision 2.17 by greg, Thu Oct 24 16:11:38 2013 UTC vs.
Revision 2.18 by greg, Fri Nov 8 05:37:20 2013 UTC

# Line 513 | Line 513 | load_bsdf_rep(FILE *ifp)
513                                  progname);
514                  return(0);
515          }
516 <        rbfh.next = NULL;               /* read each DSF */
517 <        rbfh.ejl = NULL;
516 >        memset(&rbfh, 0, sizeof(rbfh)); /* read each DSF */
517          while ((rbfh.ord = getint(4, ifp)) >= 0) {
518                  RBFNODE         *newrbf;
519  
# Line 531 | Line 530 | load_bsdf_rep(FILE *ifp)
530                                          sizeof(RBFVAL)*(rbfh.nrbf-1));
531                  if (newrbf == NULL)
532                          goto memerr;
533 <                memcpy(newrbf, &rbfh, sizeof(RBFNODE)-sizeof(RBFVAL));
533 >                *newrbf = rbfh;
534                  for (i = 0; i < rbfh.nrbf; i++) {
535                          newrbf->rbfa[i].peak = getflt(ifp);
536                          newrbf->rbfa[i].crad = getint(2, ifp) & 0xffff;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines