diff --git a/Include/osrm/RouteParameters.h b/Include/osrm/RouteParameters.h index 997ebd260..b35a0cf60 100644 --- a/Include/osrm/RouteParameters.h +++ b/Include/osrm/RouteParameters.h @@ -97,7 +97,10 @@ struct RouteParameters { } void addHint(const std::string & s) { - hints.push_back(s); + hints.resize( coordinates.size() ); + if( !hints.empty() ) { + hints.back() = s; + } } void setLanguage(const std::string & s) {