Fix CP calculation crash

Fixes SEGV in RideFileCache caused by incorrect recIntSecs setting
for a ridefile. Other reported issues with high power values for
short intervals was data related and not a bug.

Fixes #314.
This commit is contained in:
Mark Liversedge
2011-04-25 16:44:16 +01:00
parent 3a5c7822cc
commit 659d35406c
2 changed files with 11 additions and 10 deletions

View File

@@ -382,7 +382,7 @@ MeanMaxComputer::run()
// now we have downsampled lets find bests for every 20s
// starting at 6mins
for (int slice = 360; slice < (downsampled.size() * samplerate); slice += 20) {
for (int slice = 360; slice < ride_bests.size(); slice += 20) {
QVector<double> sums(downsampled.size());
int windowsize = slice / samplerate;