--- ray/src/rt/rcontrib.c 2012/06/16 17:30:13 2.9 +++ ray/src/rt/rcontrib.c 2012/06/19 01:27:13 2.11 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcontrib.c,v 2.9 2012/06/16 17:30:13 greg Exp $"; +static const char RCSid[] = "$Id: rcontrib.c,v 2.11 2012/06/19 01:27:13 greg Exp $"; #endif /* * Accumulate ray contributions for a set of materials @@ -137,7 +137,7 @@ addmodifier(char *modn, char *outf, char *binv, int bi } -/* add modifiers from a file list */ +/* Add modifiers from a file list */ void addmodfile(char *fname, char *outf, char *binv, int bincnt) { @@ -159,7 +159,7 @@ quit( /* quit program */ ) { if (nchild > 0) /* close children if any */ - end_children(); + end_children(code != 0); exit(code); } @@ -336,7 +336,7 @@ rcontrib() if (raysleft && !--raysleft) break; /* preemptive EOI */ } - if ((accumulate <= 0) | (account < accumulate)) { + if (nchild != -1 && (accumulate <= 0) | (account < accumulate)) { if (account < accumulate) { error(WARNING, "partial accumulation in final record"); accumulate -= account;