-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix int_fast16_t overflow #3740
Conversation
From the commit message, PR message and the code, I still have no idea what the problem is and what the fix fixes. |
The range arguments are int32, but the result variable is int16, therefore overflow may occur if the range does not fit 16 bits. It doesn't usually happen, because the range is usually small (this function is heavy af, it usually runs with the viewport dimensions), but the conversion MAY hurt performance. I would just use |
@ranisalt |
|
Pull Request Prelude
Changes Proposed