Skip to content

Fix draw halting when using NaN argument #3467

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MightyJosip
Copy link
Member

@MightyJosip MightyJosip commented Jun 3, 2025

Fix #3412

When using NaN as argument, skip the drawing (of that part of function)

@MightyJosip MightyJosip requested a review from a team as a code owner June 3, 2025 09:51
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

It would be nice if you added testcases for this

@@ -113,6 +113,8 @@ draw_round_rect(SDL_Surface *surf, SDL_Rect surf_clip_rect, int x1, int y1,
return NULL; \
}

#define CHECK_NAN(value) ((unsigned int)value == 0x80000000)
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather have something like isnan from math.h instead of this

@ankith26 ankith26 added this to the 2.5.6 milestone Jun 7, 2025
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.

NaNs completely deadlock draw.line
2 participants