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

Comparing ray/src/common/readwfobj.c (file contents):
Revision 2.7 by greg, Fri Dec 18 00:15:47 2020 UTC vs.
Revision 2.9 by greg, Sat Jan 15 02:00:21 2022 UTC

# Line 160 | Line 160 | add_face(Scene *sc, const VNDX ondx, int ac, char *av[
160          if (i < 0)                              /* create face if indices OK */
161                  f = addFace(sc, varr, ac);
162          if (varr != vdef)
163 <                efree((char *)varr);
163 >                efree(varr);
164          return(f != NULL);
165   }
166  
# Line 171 | Line 171 | loadOBJ(Scene *sc, const char *fspec)
171          FILE    *fp;
172          char    *argv[MAXARG];
173          int     argc;
174 <        char    buf[256];
174 >        char    buf[1024];
175          int     nstats=0, nunknown=0;
176          int     onfaces;
177          VNDX    ondx;
# Line 289 | Line 289 | loadOBJ(Scene *sc, const char *fspec)
289                  fclose(fp);
290          if (verbose)
291                  fprintf(stderr, "Read %d statements\n", nstats);
292 <        sprintf(buf, "%d statements read from \"%s\"", nstats, fspec);
292 >        if (strlen(fspec) < sizeof(buf)-32)
293 >                sprintf(buf, "%d statements read from \"%s\"", nstats, fspec);
294 >        else
295 >                sprintf(buf, "%d statements read from (TOO LONG TO SHOW)", nstats);
296          addComment(sc, buf);
297          if (nunknown) {
298                  sprintf(buf, "\t%d unrecognized", nunknown);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines