diff --git a/5/21/truck-soft/car.lua b/5/21/truck-soft/car.lua index 27d77fc..3fdc523 100644 --- a/5/21/truck-soft/car.lua +++ b/5/21/truck-soft/car.lua @@ -350,7 +350,7 @@ function process_node(profile, node, result, relations) local restricted_by_height = false if barrier == 'height_restrictor' then local maxheight = Measure.get_max_height(node:get_value_by_key("maxheight"), node) - restricted_by_height = maxheight and maxheight < profile.vehicle_height + restricted_by_height = maxheight and tonumber(maxheight) and tonumber(maxheight) < profile.vehicle_height end -- make an exception for rising bollard barriers diff --git a/5/21/truck-soft/lib/way_handlers.lua b/5/21/truck-soft/lib/way_handlers.lua index 356cf57..cc39f22 100644 --- a/5/21/truck-soft/lib/way_handlers.lua +++ b/5/21/truck-soft/lib/way_handlers.lua @@ -480,11 +480,11 @@ function WayHandlers.handle_height(profile,way,result,data) forward = Measure.get_max_height(forward,way) backward = Measure.get_max_height(backward,way) - if forward and forward < profile.vehicle_height then + if forward and tonumber(forward) and tonumber(forward) < profile.vehicle_height then result.forward_mode = mode.inaccessible end - if backward and backward < profile.vehicle_height then + if backward and tonumber(backward) and tonumber(backward) < profile.vehicle_height then result.backward_mode = mode.inaccessible end end