--- ray/src/rt/rpict.c 1990/03/01 08:19:01 1.19 +++ ray/src/rt/rpict.c 1990/03/27 11:40:07 1.20 @@ -182,7 +182,8 @@ char *zfile, *oldfile; if (write(zfd, (char *)zbar[0], hresolu*sizeof(float)) < hresolu*sizeof(float)) goto writerr; - close(zfd); + if (close(zfd) == -1) + goto writerr; for (i = 0; i <= psample; i++) free((char *)zbar[i]); } @@ -329,7 +330,7 @@ int x, y; /* pixel position */ copycolor(col, thisray.rcol); /* return color */ - return(thisray.rot); /* return distance */ + return(thisray.rt); /* return distance */ }