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

Comparing ray/src/rt/pmapray.c (file contents):
Revision 2.1 by greg, Tue Feb 24 19:39:27 2015 UTC vs.
Revision 2.3 by greg, Fri May 22 14:09:01 2015 UTC

# Line 4 | Line 4
4  
5     Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
6     (c) Fraunhofer Institute for Solar Energy Systems,
7 <       Lucerne University of Applied Sciences & Arts
7 >   (c) Lucerne University of Applied Sciences and Arts,
8 >   supported by the Swiss National Science Foundation (SNSF, #147053)
9     ==================================================================  
10    
11     $Id$
# Line 35 | Line 36 | void ray_save_pmap (RAYPARAMS *rp)
36     unsigned t;
37    
38     for (t = 0; t < NUM_PMAP_TYPES; t++) {
39 <      if (pmapParams [t].fileName) {
40 <         rp -> pmapParams [t].fileName =
41 <            (char*)malloc(strlen(pmapParams [t].fileName));          
41 <         strcpy(rp -> pmapParams [t].fileName, pmapParams [t].fileName);
42 <      }
39 >      if (pmapParams [t].fileName)
40 >         rp -> pmapParams [t].fileName = savqstr(pmapParams [t].fileName);
41 >        
42        else rp -> pmapParams [t].fileName = NULL;
43    
44        rp -> pmapParams [t].minGather = pmapParams [t].minGather;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines