diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenu.java index a27656c37e..4f1fbe0b15 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/TrackDetailsMenu.java @@ -244,7 +244,7 @@ public class TrackDetailsMenu { pointDistance += segment.points.get(i - 1).distance; } } - if (segment.points.get(i).distance + pointDistance >= startDistance && segment.points.get(i).distance <= endDistance) { + if (pointDistance + segment.points.get(i).distance >= startDistance && pointDistance + segment.points.get(i).distance <= endDistance) { if (left == 0 && right == 0) { left = segment.points.get(i).getLongitude(); right = segment.points.get(i).getLongitude();