Fix lap number issue

.. lap number jumps around when playing a crs file
This commit is contained in:
Jon Escombe
2013-02-07 19:28:55 +00:00
committed by Mark Liversedge
parent 27216539d2
commit 7c84a1e905

View File

@@ -585,7 +585,8 @@ ErgFile::gradientAt(long x, int &lapnum)
if (x>=Laps.at(i).x) lap += 1;
}
lapnum = lap;
}
} else lapnum = 0;
// find right section of the file
while (x < Points.at(leftPoint).x || x > Points.at(rightPoint).x) {