--- ray/src/common/face.c 1989/07/28 14:27:44 1.3 +++ ray/src/common/face.c 1991/11/12 16:55:08 2.1 @@ -1,4 +1,4 @@ -/* Copyright (c) 1986 Regents of the University of California */ +/* Copyright (c) 1991 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -84,7 +84,7 @@ OBJREC *o; badvert += fabs(d1 - f->offset/i) > VERTEPS; f->offset += d1; } - f->offset /= f->nv; + f->offset /= (double)f->nv; if (badvert) objerror(o, WARNING, "non-planar vertex"); /* find axis */ @@ -99,6 +99,8 @@ OBJREC *o; freeface(o) /* free memory associated with face */ OBJREC *o; { + if (o->os == NULL) + return; free(o->os); o->os = NULL; } @@ -111,7 +113,7 @@ FACE *f; int ncross, n; double x, y; register int xi, yi; - register double *p0, *p1; + register FLOAT *p0, *p1; xi = (f->ax+1)%3; yi = (f->ax+2)%3;