diff --git a/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java b/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java index 1c1e6b07d8..6896cfbc64 100644 --- a/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java +++ b/OsmAnd-java/src/net/osmand/router/PrecalculatedRouteDirection.java @@ -54,9 +54,9 @@ public class PrecalculatedRouteDirection { this.maxSpeed = parent.maxSpeed; boolean inverse = false; if (s1 > s2) { - s1 = s1 + s2; - s2 = s1 - s2; - s1 = s1 - s2; + int tmp = s1; + s1 = s2; + s2 = tmp; inverse = true; } tms = new float[s2 - s1 + 1];