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 committed by Patrick Niklaus
parent 403db7cc84
commit c757f70b97

View File

@ -413,7 +413,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