From ef643006b9d4a27120a0976e25bf7500777fbb95 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 6 May 2015 23:21:28 +0200 Subject: [PATCH] Fix shorten route calculation --- OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java b/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java index 9ffae73970..4d7ef34c81 100644 --- a/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java +++ b/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java @@ -334,7 +334,7 @@ public class RoutePlannerFrontEnd { runRecalculation = rlist.size() > 0; if (rlist.size() > 0) { RouteSegment previous = null; - for (int i = 0; i < rlist.size() - 1; i++) { + for (int i = 0; i <= rlist.size() - 1; i++) { RouteSegmentResult rr = rlist.get(i); RouteSegment segment = new RouteSegment(rr.getObject(), rr.getEndPointIndex()); if (previous != null) {