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.5 by greg, Tue Sep 1 16:27:53 2015 UTC

# Line 1 | Line 1
1 + #ifndef lint
2 + static const char RCSid[] = "$Id$";
3 + #endif
4   /*
5     ==================================================================
6     Photon map interface to RADIANCE raycalls
7  
8     Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
9     (c) Fraunhofer Institute for Solar Energy Systems,
10 <       Lucerne University of Applied Sciences & Arts
10 >   (c) Lucerne University of Applied Sciences and Arts,
11 >   supported by the Swiss National Science Foundation (SNSF, #147053)
12     ==================================================================  
13    
10   $Id$
14   */
15  
16  
# Line 35 | Line 38 | void ray_save_pmap (RAYPARAMS *rp)
38     unsigned t;
39    
40     for (t = 0; t < NUM_PMAP_TYPES; t++) {
41 <      if (pmapParams [t].fileName) {
42 <         rp -> pmapParams [t].fileName =
43 <            (char*)malloc(strlen(pmapParams [t].fileName));          
41 <         strcpy(rp -> pmapParams [t].fileName, pmapParams [t].fileName);
42 <      }
41 >      if (pmapParams [t].fileName)
42 >         rp -> pmapParams [t].fileName = savqstr(pmapParams [t].fileName);
43 >        
44        else rp -> pmapParams [t].fileName = NULL;
45    
46        rp -> pmapParams [t].minGather = pmapParams [t].minGather;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines