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

Error out on NaNs/Infinities coming from Lua. #1902

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Error out on NaNs/Infinities coming from Lua. #1902

merged 1 commit into from
Jan 17, 2025

Conversation

lhog
Copy link
Collaborator

@lhog lhog commented Jan 17, 2025

NaNs and Infs are contagious.
Additionally NaNs are not clamped by std::clamp() leading to all sorts of access violations.
In short NaNs should never be accepted from Lua.

…gious. Additionally NaNs are not clamped by std::clamp() leading to all sorts of access violations. In shorts NaNs should never be accepted from Lua.
@lhog lhog merged commit a87d53b into master Jan 17, 2025
2 checks passed
@lhog lhog deleted the LuaNan branch January 17, 2025 22:34
github-actions bot pushed a commit that referenced this pull request Jan 18, 2025
First, NaNs and Infs are contagious, making the game object completely unusable.
Additionally, NaNs are not filtered out by std::clamp()/std::min()/std::max() checks leading to all sorts of access violations, if the result is used to query engine array maps.

In short NaNs are evil and should never be accepted from Lua. (#1902)
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.

1 participant