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

Parser: boolcast lhs of logical or expression even if not evaluating it #670

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

ehaas
Copy link
Collaborator

@ehaas ehaas commented Apr 6, 2024

Ensure that the value, if present, is zero or one.

Closes #668

…g it

Ensure that the value, if present, is zero or one.

Closes Vexu#668
@Vexu Vexu merged commit e9e4dc9 into Vexu:master Apr 6, 2024
3 checks passed
@Vexu
Copy link
Owner

Vexu commented Apr 6, 2024

Doesn't this also happen with landExpr?

@ehaas
Copy link
Collaborator Author

ehaas commented Apr 6, 2024

With landExpr it short-circuits if the value is zero, but all zeroes have the same representation since they're a special value.

Edit: the original issue would not trigger with float f = 1.0 || 0; for the same reason.

@ehaas ehaas deleted the bool-or branch April 6, 2024 06:54
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.

Crash: assign boolean or result to float
2 participants