--- ray/src/util/rmtxop.c 2023/12/03 02:28:33 2.28 +++ ray/src/util/rmtxop.c 2023/12/08 00:12:31 2.30 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rmtxop.c,v 2.28 2023/12/03 02:28:33 greg Exp $"; +static const char RCSid[] = "$Id: rmtxop.c,v 2.30 2023/12/08 00:12:31 greg Exp $"; #endif /* * General component matrix operations. @@ -69,7 +69,7 @@ checkreffile(ROPMAT *rop) fclose(fp); curRF = rop->preop.csym; } - if ((refm.ncomp == 3) & (refm.dtype != DTspec)) { + if (refm.ncomp == 3) { rop->preop.csym = (refm.dtype == DTxyze) ? "XYZ" : "RGB"; return(checksymbolic(rop)); } @@ -103,6 +103,7 @@ checkreffile(ROPMAT *rop) for (j = refm.ncomp; j-- > 0; ) rop->preop.cmat[j*nc + i] = scresp[j]; } + memcpy(rop->mtx->wlpart, refm.wlpart, sizeof(rop->mtx->wlpart)); return(0); } @@ -244,8 +245,7 @@ checksymbolic(ROPMAT *rop) } else if (!strcmp(rop->preop.csym, "RGB")) { if (dt <= DTspec) return(DTrgbe); - } - if ((nc > 3) & (dt <= DTspec)) + } else if (dt == DTspec) return(DTfloat); /* probably not actual spectrum */ return(0); }