Don't fail on incorrect lane tags '1; 2'

This commit is contained in:
Michael Krasnyk 2016-10-24 23:07:32 +02:00 committed by Patrick Niklaus
parent 1905a0f473
commit 86b70f2632
2 changed files with 16 additions and 1 deletions

View File

@ -35,3 +35,18 @@ Feature: Features related to bugs
When I route I should get
| waypoints | route | turns |
| 1,2 | top,right,right | depart,new name right,arrive |
@3156
Scenario: Incorrect lanes tag
Given the node map
"""
a b
"""
And the ways
| nodes | lanes |
| ab | 1; 2 |
And the data has been saved to disk
When I try to run "osrm-extract {osm_file} --profile {profile_file}"
Then it should exit successfully

View File

@ -63,7 +63,7 @@ function Guidance.set_classification (highway, result, input_way)
local lane_count = input_way:get_value_by_key("lanes")
if lane_count and lane_count ~= "" then
local lc = tonumber(lane_count)
if lane_count ~= nil then
if lc ~= nil then
result.road_classification.num_lanes = lc
end
else