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

Comparing ray/src/common/objutil.c (file contents):
Revision 2.19 by greg, Fri Apr 23 18:31:45 2021 UTC vs.
Revision 2.20 by greg, Sat May 1 00:58:18 2021 UTC

# Line 991 | Line 991 | xfmScene(Scene *sc, const char *xfm)
991          if (!*xfm)
992                  return(0);
993                                          /* parse string into words */
994 <        xav[0] = strcpy((char *)emalloc(strlen(xfm)+1), xfm);
994 >        xav[0] = savqstr((char *)xfm);
995          xac = 1; i = 0;
996          for ( ; ; ) {
997                  while (!isspace(xfm[++i]))
# Line 1002 | Line 1002 | xfmScene(Scene *sc, const char *xfm)
1002                  if (!xfm[i])
1003                          break;
1004                  if (xac >= MAXAC-1) {
1005 <                        free(xav[0]);
1005 >                        freeqstr(xav[0]);
1006                          return(0);
1007                  }
1008                  xav[xac++] = xav[0] + i;
1009          }
1010          xav[xac] = NULL;
1011          i = xfScene(sc, xac, xav);
1012 <        efree((char *)xav[0]);
1012 >        freeqstr(xav[0]);
1013          return(i);
1014   }
1015   #undef MAXAC

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines