--- ray/src/common/mesh.c 2003/07/10 03:47:00 2.11 +++ ray/src/common/mesh.c 2003/07/21 22:30:17 2.13 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: mesh.c,v 2.11 2003/07/10 03:47:00 greg Exp $"; +static const char RCSid[] = "$Id: mesh.c,v 2.13 2003/07/21 22:30:17 schorsch Exp $"; #endif /* * Mesh support routines @@ -410,11 +410,12 @@ OBJECT mo; pn[i] = vid[i] >> 8; } /* normalize material index */ - if (mo != OVOID) + if (mo != OVOID) { if ((mo -= mp->mat0) >= mp->nmats) mp->nmats = mo+1; else if (mo < 0) error(INTERNAL, "modifier range error in addmeshtri"); + } /* assign triangle */ if (pn[0] == pn[1] && pn[1] == pn[2]) { /* local case */ pp = &mp->patch[pn[0]]; @@ -611,7 +612,7 @@ FILE *fp; t2cnt += pp->nj2tris; } fprintf(fp, "Mesh statistics:\n"); - fprintf(fp, "\t%d materials\n", ms->nmats); + fprintf(fp, "\t%ld materials\n", ms->nmats); fprintf(fp, "\t%d patches (%.2f MBytes)\n", ms->npatches, (ms->npatches*sizeof(MESHPATCH) + vcnt*3*sizeof(uint32) +