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 off-by-one in peephole optimizer #2131

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

ike709
Copy link
Collaborator

@ike709 ike709 commented Dec 10, 2024

Fixes #2130

The Math.Max() didn't account for i++ so i could never actually be 0 after the first iteration of the for() loop.

tl;dr off-by-one error

@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Dec 10, 2024
@wixoaGit wixoaGit merged commit ac33d86 into OpenDreamProject:master Dec 10, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compiler Involves the OpenDream compiler size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Peephole optimizer still skips viable opts
2 participants