Make Route plugin validate its parameters

This commit is contained in:
Daniel J. Hofmann 2016-03-18 15:30:08 +01:00 committed by Patrick Niklaus
parent de1f1b8ab3
commit c087a11659

View File

@ -30,6 +30,8 @@ ViaRoutePlugin::ViaRoutePlugin(datafacade::BaseDataFacade &facade_, int max_loca
Status ViaRoutePlugin::HandleRequest(const api::RouteParameters &route_parameters,
util::json::Object &json_result)
{
BOOST_ASSERT(route_parameters.IsValid());
if (max_locations_viaroute > 0 &&
(static_cast<int>(route_parameters.coordinates.size()) > max_locations_viaroute))
{