Or is it something intrinsically silly in adding a path to itself like
path.addTriangle({ 0.0f, 0.0f }, { 0.71f, 0.5f }, { 0, 1.0f });
path.closeSubPath();
path.addPath(path, AffineTransform().translated(1.0f, 0.0f));
?
in Path::addPath the markers of the path being added are looped through like
for (int i = 0; i < other.data.size();)
{
//add markers to destination path i.e this
}
but while other.data is the same as this.data (the path is added to itself, remember)
the number of markers will never run out…
The catastrophy can be avoided by simply changing the code to
auto numSourceMarkers = other.data.size();
for (int i = 0; i < numSourceMarkers;)
{
//add markers to destination path but stop in time
}
I think.