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

Comparing ray/src/px/pflip.c (file contents):
Revision 2.2 by greg, Mon Sep 21 12:14:23 1992 UTC vs.
Revision 2.3 by greg, Wed Oct 28 11:23:22 1992 UTC

# Line 128 | Line 128 | scanfile()                             /* scan to the end of file */
128                  memerr();
129          if ((scanin = (COLR *)malloc(xres*sizeof(COLR))) == NULL)
130                  memerr();
131 <        for (y = yres-1; y >= 0; y--) {
131 >        for (y = yres-1; y > 0; y--) {
132                  scanpos[y] = ftell(fin);
133                  if (freadcolrs(scanin, xres, fin) < 0) {
134                          fprintf(stderr, "%s: read error\n", progname);
135                          exit(1);
136                  }
137          }
138 +        scanpos[0] = ftell(fin);
139          free((char *)scanin);
140   }
141  
# Line 170 | Line 171 | flip()                                 /* flip the picture */
171                  }
172          }
173          free((char *)scanin);
174 <        free((char *)scanout);
174 >        if (fhoriz)
175 >                free((char *)scanout);
176   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines