From 9378af105706001f2842c97a0182bfbd662b7ee5 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 10 Feb 2014 11:43:26 +0100 Subject: [PATCH] fixes #907, segfault when ampersands where missing --- Include/osrm/RouteParameters.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Include/osrm/RouteParameters.h b/Include/osrm/RouteParameters.h index 2917597ae..997ebd260 100644 --- a/Include/osrm/RouteParameters.h +++ b/Include/osrm/RouteParameters.h @@ -45,7 +45,9 @@ struct RouteParameters { geometry(true), compression(true), deprecatedAPI(false), - checkSum(-1) {} + checkSum(-1) + { } + short zoomLevel; bool printInstructions; bool alternateRoute; @@ -95,8 +97,7 @@ struct RouteParameters { } void addHint(const std::string & s) { - hints.resize(coordinates.size()); - hints.back() = s; + hints.push_back(s); } void setLanguage(const std::string & s) {