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

Comparing ray/src/util/dctimestep.c (file contents):
Revision 2.49 by greg, Fri Mar 11 02:44:33 2022 UTC vs.
Revision 2.51 by greg, Wed Mar 5 02:54:58 2025 UTC

# Line 47 | Line 47 | sum_images(const char *fspec, const CMATRIX *cv, FILE
47                          sprintf(errmsg, "cannot open picture '%s'", fname);
48                          error(SYSTEM, errmsg);
49                  }
50 + #ifdef getc_unlocked
51 +                flockfile(fp);
52 + #endif
53                  dt = DTfromHeader;
54                  if ((err = cm_getheader(&dt, NULL, NULL, NULL, NULL, fp)) != NULL)
55                          error(USER, err);
# Line 74 | Line 77 | sum_images(const char *fspec, const CMATRIX *cv, FILE
77                  }
78                                                          /* flat file check */
79                  if ((data_start = ftell(fp)) > 0 && fseek(fp, 0L, SEEK_END) == 0) {
80 <                        flat_file = (ftell(fp) == data_start + sizeof(COLR)*xr*yr);
80 >                        flat_file = (ftell(fp) >= data_start + sizeof(COLR)*xr*yr);
81                          if (fseek(fp, data_start, SEEK_SET) < 0) {
82                                  sprintf(errmsg, "cannot seek on picture '%s'", fname);
83                                  error(SYSTEM, errmsg);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines