--- ray/src/common/bsdf.c 2014/03/24 04:00:45 2.48 +++ ray/src/common/bsdf.c 2015/02/08 22:14:50 2.50 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bsdf.c,v 2.48 2014/03/24 04:00:45 greg Exp $"; +static const char RCSid[] = "$Id: bsdf.c,v 2.50 2015/02/08 22:14:50 greg Exp $"; #endif /* * bsdf.c @@ -199,7 +199,7 @@ SDloadFile(SDData *sd, const char *fname) } wtl = ezxml_child(ezxml_child(fl, "Optical"), "Layer"); if (wtl == NULL) { - sprintf(SDerrorDetail, "BSDF \"%s\": no optical layers'", + sprintf(SDerrorDetail, "BSDF \"%s\": no optical layers", sd->name); ezxml_free(fl); return SDEformat; @@ -763,8 +763,7 @@ SDsampBSDF(SDValue *sv, FVECT ioVec, double randX, int cdarr[i] = (*rdf->comp[i].func->getCDist)(inVec, &rdf->comp[i]); if (cdarr[i] == NULL) cdarr[i] = &SDemptyCD; - else - sv->cieY += cdarr[i]->cTotal; + sv->cieY += cdarr[i]->cTotal; } if (sv->cieY <= 1e-6) { /* anything to sample? */ sv->cieY = .0;