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

Comparing ray/src/cv/pabopto2xyz.c (file contents):
Revision 2.5 by greg, Wed Jun 12 00:09:18 2019 UTC vs.
Revision 2.6 by greg, Thu Feb 11 03:05:34 2021 UTC

# Line 496 | Line 496 | main(int argc, char *argv[])
496                  char    *flist[MAX_INPUTS];
497                  int     k, n;
498                  n = wordfile(flist, MAX_INPUTS, argv[i+j]);
499 <                if (n <= 0) {
499 >                if ((n <= 0) | (n >= MAX_INPUTS-1)) {
500                          fputs(argv[i+j], stderr);
501 <                        fputs(": cannot load input file names\n", stderr);
501 >                        if (n < 0)
502 >                                fputs(": cannot load input file names\n", stderr);
503 >                        else if (n == 0)
504 >                                fputs(": empty file\n", stderr);
505 >                        else /* n >= MAX_INPUTS-1 */
506 >                                fputs(": too many file names\n", stderr);
507                          return(1);
508                  }
509                  slist[j] = (PGINPUT *)malloc(sizeof(PGINPUT)*(n+1));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines