--- ray/src/cv/bsdfquery.c 2013/11/22 00:00:27 2.2 +++ ray/src/cv/bsdfquery.c 2014/04/11 20:27:23 2.3 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bsdfquery.c,v 2.2 2013/11/22 00:00:27 greg Exp $"; +static const char RCSid[] = "$Id: bsdfquery.c,v 2.3 2014/04/11 20:27:23 greg Exp $"; #endif /* * Query values from the given BSDF (scattering interpolant or XML repres.) @@ -27,8 +27,8 @@ readIOdir(FVECT idir, FVECT odir, FILE *fp, int fmt) switch (fmt) { case 'a': - if (fscanf(fp, "%lf %lf %lf %lf %lf %lf", - dvec, dvec+1, dvec+2, dvec+3, dvec+4, dvec+5) != 6) + if (fscanf(fp, FVFORMAT, dvec, dvec+1, dvec+2) != 3 || + fscanf(fp, FVFORMAT, dvec+3, dvec+4, dvec+5) != 3) return(0); VCOPY(idir, dvec); VCOPY(odir, dvec+3);