Sane failure for rides longer than a week, which usually happen because

someone sets the date on their PT and doesn't reset the device before going
for a ride.  This fix will keep GC working until the user splits the ride
(and until we add a ride-splitting function).
This commit is contained in:
Sean C. Rhea
2008-05-18 14:19:37 +00:00
parent f91e45d950
commit babbaa7e2c
2 changed files with 12 additions and 0 deletions

View File

@@ -118,6 +118,10 @@ update_cpi_file(const cpi_file_info *info, QProgressDialog *progress,
assert(out);
int total_secs = (int) ceil(data.points.back().secs);
if (total_secs > 7*24*60*60) {
fclose(out);
return;
}
double *bests = (double*) calloc(total_secs + 1, sizeof(double));
bool canceled = false;