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

Prevent nextPos for connectEdges from accessing past end of array. #89

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

terrencecrowley
Copy link
Contributor

I am not certain whether this is a consequence of my previous bug fix, independent of that bug fix, or a revealed bug from that bug fix. In any case, the code prior to this fix was a bit sketchy since the top of the loop was checking that the incrementing variable was less than length of the array but the code inside the loop could already have used that variable to index into the array (which is where this crash was occurring). The change here is simply to only access the array if the index is less than the length.

I did not add an additional test case as my datasets that were triggering this bug are large and I needed to do some significant work to cull them down.

@faroscore
Copy link

+1 for this merge request. I have the example, where martinez hangs out. This commit fixed problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants