Skip to content

Fix an off-by-one error in Tools::ddilog#24

Merged
scarrazza merged 1 commit into
scarrazza:masterfrom
ivnoviko:master
Jun 21, 2024
Merged

Fix an off-by-one error in Tools::ddilog#24
scarrazza merged 1 commit into
scarrazza:masterfrom
ivnoviko:master

Conversation

@ivnoviko
Copy link
Copy Markdown

The loop over coefficients _C starts with index i=_C.size(), which is out of bounds because the last element has index i=_C.size()-1.

This does not matter if the uninitialized _C[_C.size()] happens to be zero, but I believe this is not guaranteed.

@scarrazza scarrazza self-requested a review June 21, 2024 11:39
Copy link
Copy Markdown
Owner

@scarrazza scarrazza left a comment

Choose a reason for hiding this comment

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

Thank you for spotting this issue.

@scarrazza scarrazza merged commit c71f570 into scarrazza:master Jun 21, 2024
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.

2 participants