--- ray/src/hd/rhcopy.c 2011/05/20 02:06:39 3.27 +++ ray/src/hd/rhcopy.c 2018/08/02 18:33:42 3.30 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rhcopy.c,v 3.27 2011/05/20 02:06:39 greg Exp $"; +static const char RCSid[] = "$Id: rhcopy.c,v 3.30 2018/08/02 18:33:42 greg Exp $"; #endif /* * Copy data into a holodeck file @@ -101,7 +101,7 @@ holheadline( /* check holodeck header line */ void *vhf ) { - char fmt[32]; + char fmt[MAXFMTLEN]; int *hf = vhf; if (formatval(fmt, s)) { @@ -359,7 +359,7 @@ addpicz( /* add a picture + depth-buffer */ error(USER, errmsg); } if (phd.altprims) { - sprintf(errmsg, "ignoring primary values in picture \"%s\"", + sprintf(errmsg, "ignoring color primaries in picture \"%s\"", pcf); error(WARNING, errmsg); } @@ -398,6 +398,8 @@ addpicz( /* add a picture + depth-buffer */ error(USER, errmsg); } for (i = scanlen(&prs); i--; ) { /* do each pixel */ + if (zscn[i] <= 0.0) + continue; /* illegal depth */ pix2loc(vl, &prs, i, j); aftd = viewray(ro, rd, &phd.vw, vl[0], vl[1]); if (aftd < -FTINY)