ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rfluxmtx.c
(Generate patch)

Comparing ray/src/util/rfluxmtx.c (file contents):
Revision 2.46 by greg, Mon Oct 1 15:51:48 2018 UTC vs.
Revision 2.48 by greg, Mon Jul 29 22:52:39 2019 UTC

# Line 144 | Line 144 | oconv_command(int ac, char *av[])
144                  strcpy(cp, "-w- ");
145                  cp += 4;
146          }
147 <        while (ac-- > 0) {
148 <                strcpy(cp, *av++);
149 <                while (*cp) cp++;
150 <                *cp++ = ' ';
151 <                if (cp >= oconvbuf+(sizeof(oconvbuf)-32))
147 >        while (ac-- > 0) {      /* copy each argument */
148 >                int     len = strlen(*av);
149 >                if (cp+len+4 >= oconvbuf+sizeof(oconvbuf))
150                          goto overrun;
151 +                if (matchany(*av, SPECIALS)) {
152 +                        *cp++ = QUOTCHAR;
153 +                        strcpy(cp, *av++);
154 +                        cp += len;
155 +                        *cp++ = QUOTCHAR;
156 +                } else {
157 +                        strcpy(cp, *av++);
158 +                        cp += len;
159 +                }
160 +                *cp++ = ' ';
161          }
162                                  /* receiver goes last */
163          if (matchany(recv, SPECIALS)) {
# Line 661 | Line 669 | sample_origin(PARAMS *p, FVECT orig, const FVECT rdir,
669                  projsa[i] = -DOT(sp->snrm, rdir) * sp->area;
670                  tarea += projsa[i] *= (double)(projsa[i] > FTINY);
671          }
672 <        if (tarea <= FTINY) {           /* wrong side of sender? */
672 >        if (tarea < 0) {                /* wrong side of sender? */
673                  fputs(progname, stderr);
674                  fputs(": internal - sample behind all sender elements!\n",
675                                  stderr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines