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

Fix Timespan Addition Overflow Exception #6328

Merged
merged 3 commits into from
Feb 17, 2024
Merged

Conversation

UnderscoreTud
Copy link
Member

@UnderscoreTud UnderscoreTud commented Jan 14, 2024

Description

This PR fixes an issue where if two timespans were to be added together and the resulting value is more than the long range, it would overflow into a negative value, which causes an exception since milliseconds of timespans must be 0 or above (non-negative number). To fix this, when an overflow happens the milliseconds would be the max long value.


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

@UnderscoreTud UnderscoreTud added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jan 14, 2024
@sovdeeth sovdeeth added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Jan 14, 2024
@sovdeeth sovdeeth changed the base branch from dev/feature to dev/patch January 29, 2024 11:17
@sovdeeth sovdeeth added the 2.8 Targeting a 2.8.X version release label Feb 17, 2024
@sovdeeth sovdeeth merged commit ba63892 into dev/patch Feb 17, 2024
5 checks passed
@sovdeeth sovdeeth deleted the fix/timespan-addition branch February 17, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8 Targeting a 2.8.X version release 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.

None yet

3 participants