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

Comparing ray/src/util/vwrays.c (file contents):
Revision 3.18 by greg, Thu Aug 18 00:52:48 2016 UTC vs.
Revision 3.19 by greg, Mon Mar 4 22:41:20 2019 UTC

# Line 196 | Line 196 | pix2rays(
196                  px += .5; py += .5;
197                  loc[0] = px/rs.xr; loc[1] = py/rs.yr;
198                  if (zfd >= 0) {
199 +                        if ((loc[0] < 0) | (loc[0] >= 1) |
200 +                                        (loc[1] < 0) | (loc[1] >= 1)) {
201 +                                fprintf(stderr, "%s: input pixel outside image\n",
202 +                                                progname);
203 +                                exit(1);
204 +                        }
205                          loc2pix(pp, &rs, loc[0], loc[1]);
206                          if (lseek(zfd,
207                                  (pp[1]*scanlen(&rs)+pp[0])*sizeof(float),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines