Skip to content

Wayland: Fix division by zero when scale is less than 1 #107787

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 1 commit into from
Jun 21, 2025

Conversation

Riteo
Copy link
Contributor

@Riteo Riteo commented Jun 21, 2025

The Vector2i division operator casts doubles down to int32_t. It would thus truncate the fractional scale factor to 0 if less than 1, resulting in a FPE on x86_64.

The `Vector2i` division operator casts doubles down to `int32_t`. It
would thus truncate the fractional scale factor to 0 if less than 1,
resulting in a FPE on x86_64.
@Riteo Riteo added this to the 4.5 milestone Jun 21, 2025
@Riteo Riteo requested a review from a team as a code owner June 21, 2025 02:06
@akien-mga akien-mga merged commit 4e6ac9b into godotengine:master Jun 21, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants