Prevents possible overflow in applying a turn penalty onto restricted roads

This commit is contained in:
Daniel J. Hofmann 2017-05-18 16:10:43 +02:00
parent 3aeb39ba95
commit e6b1e3564a

View File

@ -417,7 +417,7 @@ function turn_function (turn)
if properties.weight_name == 'routability' then
-- penalize turns from non-local access only segments onto local access only tags
if not turn.source_restricted and turn.target_restricted then
turn.weight = turn.weight + profile.restricted_penalty
turn.weight = profile.restricted_penalty
end
end
end