From f89bae45952ac5fd0cd85a70d36e07c95badaa9a Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 18 Mar 2019 15:58:18 +0100 Subject: [PATCH] Parse as float to avoid issues with custom user input --- .../java/net/osmand/router/TransportRoutingConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java index a5c3f7bae9..6a0bf5cd1c 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java @@ -92,7 +92,7 @@ public class TransportRoutingConfiguration { maxRouteTime = router.getIntAttribute("maxRouteTime", maxRouteTime); finishTimeSeconds = router.getIntAttribute("delayForAlternativesRoutes", finishTimeSeconds); String mn = params.get("max_num_changes"); - maxNumberOfChanges = RoutingConfiguration.parseSilentInt(mn, maxNumberOfChanges); + maxNumberOfChanges = (int) RoutingConfiguration.parseSilentFloat(mn, maxNumberOfChanges); walkSpeed = router.getFloatAttribute("minDefaultSpeed", this.walkSpeed * 3.6f) / 3.6f; defaultTravelSpeed = router.getFloatAttribute("maxDefaultSpeed", this.defaultTravelSpeed * 3.6f) / 3.6f;