DotSpatial.Topology.EnvelopeExt.Intersection(this IEnvelope self, ILineSegment segment)
This method throws an IndexOutOfRangeException because we try to check more than two borderpoints
if we already have two Points we break instead
Before
Line 845
for (int i = 0; i < 4; i++)
{
borderPoints[count] = border[i].Intersection(segment);
if (borderPoints[count] != null)
{
count++;
}
}
After
Line 845
for (int i = 0; i < 4; i++)
{
borderPoints[count] = border[i].Intersection(segment);
if (borderPoints[count] != null)
{
count++;
if (count > 1)
break;
}
}
This method throws an IndexOutOfRangeException because we try to check more than two borderpoints
if we already have two Points we break instead
Before
Line 845
for (int i = 0; i < 4; i++)
{
borderPoints[count] = border[i].Intersection(segment);
if (borderPoints[count] != null)
{
count++;
}
}
After
Line 845
for (int i = 0; i < 4; i++)
{
borderPoints[count] = border[i].Intersection(segment);
if (borderPoints[count] != null)
{
count++;
if (count > 1)
break;
}
}