--- ray/src/rt/ambient.c 1996/07/10 13:33:56 2.41 +++ ray/src/rt/ambient.c 1997/01/02 09:37:13 2.42 @@ -144,9 +144,10 @@ char *afile; pos += (long)nambvals*AMBVALSIZ; flen = lseek(fileno(ambfp), 0L, 2); if (flen != pos) { - error(WARNING, + sprintf(errmsg, "ignoring last %ld values in ambient file (corrupted)", (flen - pos)/AMBVALSIZ); + error(WARNING, errmsg); fseek(ambfp, pos, 0); ftruncate(fileno(ambfp), pos); }