Skip to content

Fix a bug where Forkable::LowerBound would sometimes return an incorrect iterator #1395

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

Merged
merged 9 commits into from
May 25, 2017

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented May 24, 2017

In particular, if that iterator was at end we would be reading random memory. This manifested itself by markers (notably for apoasides) drawn in the middle of nowhere and by the inability to replay some journals.

}
if (!((*ancestry_it)->timeline_empty() ||
(*fork_points_it &&
**fork_points_it == (*ancestry_it)->timeline_end()))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use De Morgan to make the comment reflect the condition.

@eggrobin eggrobin added the LGTM label May 25, 2017
@pleroy
Copy link
Member Author

pleroy commented May 25, 2017

Retest this please

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

Successfully merging this pull request may close these issues.

None yet

2 participants