Skip to content

Conversation

sovdeeth
Copy link
Member

Problem

#8085 showed using NaN can cause issues with the round function.

Solution

I've added checks for non-finite inputs and return either the value if the value was non-finite, or NaN if the placement was too large for BigInt to handle.

Testing Completed

Added a regression test.

Supporting Information


Completes: #8085
Related: none

@sovdeeth sovdeeth requested a review from a team as a code owner July 25, 2025 16:45
@sovdeeth sovdeeth requested review from Efnilite and cheeezburga and removed request for a team July 25, 2025 16:45
@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jul 25, 2025
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Jul 25, 2025
@sovdeeth sovdeeth linked an issue Jul 25, 2025 that may be closed by this pull request
1 task
@APickledWalrus APickledWalrus moved this to In Progress in 2.12 Releases Jul 25, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Awaiting Merge in 2.12 Releases Jul 26, 2025
@skriptlang-automation skriptlang-automation bot added patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. and removed needs reviews A PR that needs additional reviews labels Jul 26, 2025
@APickledWalrus APickledWalrus merged commit a9f9694 into SkriptLang:dev/patch Jul 30, 2025
5 of 6 checks passed
@skriptlang-automation skriptlang-automation bot added the completed The issue has been fully resolved and the change will be in the next Skript update. label Jul 30, 2025
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done - Awaiting Release in 2.12 Releases Jul 30, 2025
@skriptlang-automation skriptlang-automation bot removed the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Jul 30, 2025
@sovdeeth sovdeeth moved this from Done - Awaiting Release to Done - Released in 2.12 Releases Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
Status: Done - Released
Development

Successfully merging this pull request may close these issues.

NumberFormatException default function
4 participants