mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Strava download - avoid crashes when lap swim file has 0 lenght lap
Includes sample file from users forum
This commit is contained in:
@@ -973,7 +973,7 @@ Strava::prepareResponse(QByteArray* data)
|
||||
|
||||
double start = starttime.secsTo(QDateTime::fromString(lap["start_date_local"].toString(), Qt::ISODate));
|
||||
if (start < last_lap) start = last_lap + 1; // Don't overlap
|
||||
double end = start + lap["elapsed_time"].toDouble() - 1;
|
||||
double end = start + std::max(lap["elapsed_time"].toDouble(), 1.0) - 1;
|
||||
|
||||
last_lap = end;
|
||||
|
||||
|
||||
BIN
test/swims/Morning_Swim.fit
Normal file
BIN
test/swims/Morning_Swim.fit
Normal file
Binary file not shown.
Reference in New Issue
Block a user