Skip to content

Fix Truncation in Timespan Tabulation#7646

Merged
sovdeeth merged 3 commits into
SkriptLang:dev/patchfrom
sovdeeth:patch/timespan-truncatioon
Feb 28, 2025
Merged

Fix Truncation in Timespan Tabulation#7646
sovdeeth merged 3 commits into
SkriptLang:dev/patchfrom
sovdeeth:patch/timespan-truncatioon

Conversation

@sovdeeth
Copy link
Copy Markdown
Member

Description

Does as much math in doubles as possible before clamping to long when creating the timespan.


Target Minecraft Versions: any
Requirements: none
Related Issues: #7645

@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Feb 25, 2025
@erenkarakal
Copy link
Copy Markdown
Member

executing 'send 5 seconds / 0'
292471208 years and 8 months and 1 week and 7 hours and 12 minutes and 55.81 seconds

@Jjman739
Copy link
Copy Markdown

executing 'send 5 seconds / 0'
292471208 years and 8 months and 1 week and 7 hours and 12 minutes and 55.81 seconds

Seems in line with existing behavior.

executing 'message 1/0'
Infinity

@erenkarakal erenkarakal added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Feb 25, 2025
Comment thread src/main/java/ch/njol/skript/classes/data/DefaultOperations.java Outdated
@sovdeeth sovdeeth merged commit c000483 into SkriptLang:dev/patch Feb 28, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
* switch timespan mult/div to use doubles until creating the timespan

* revert to /0 equaling null
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. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants