The total length of a contour was incorrectly computed, which could cause the longest detour was selected instead of the shortest one in some cases.
The total length of a contour was incorrectly computed, which could cause the longest detour was selected instead of the shortest one in some cases.