Skip to content

Fix #726 (#if: ?: treats a zero condition as true unless it is written exactly as 0) - #728

Merged
danmar merged 1 commit into
masterfrom
fix-726
Nov 7, 2026
Merged

danmar merged 1 commit into
masterfrom
fix-726

Conversation

@danmar

@danmar danmar commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

?: and ! compared the operand with the string "0", so zero values such as 00, -0 and 0L were taken as true. Compare the numeric value instead.

…n exactly as 0)

?: and ! compared the operand with the string "0", so zero values such as
00, -0 and 0L were taken as true. Compare the numeric value instead.
@danmar
danmar merged commit 9f5687e into master Nov 7, 2026
47 checks passed
@danmar
danmar deleted the fix-726 branch November 7, 2026 11:14
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