Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash caused by fixed size collection. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TraistaRafael
Copy link

In some cases this variables will be accessed by Plane.SplitPolygon() and at it will crash, because the Collection is fixed size, so cannot use Add()

switch (polygonType)
{
case COPLANAR:
(_normal.Dot(polygon.Plane._normal) > 0 ? coplanarFront : coplanarBack).Add(polygon);
break;
...
}

In some cases this variables will be accessed by Plane.SplitPolygon and at this line it will crash, because the Collection is fixed size, so cannot Add()
(_normal.Dot(polygon.Plane._normal) > 0 ? coplanarFront : coplanarBack).Add(polygon)
@TraistaRafael
Copy link
Author

Hello, thankyou for the project. Really useful!
However, I had a crash that I tracked for some time, and I would like to propose a solution.

@TraistaRafael TraistaRafael marked this pull request as ready for review April 25, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant