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

[BED-4820] Fix: Min-valued nano durations would throw Overflow exceptions #161

Closed
wants to merge 1 commit into from

Conversation

definitelynotagoblin
Copy link
Contributor

Description

Min-value data for new duration properties throw OverflowException when converted to positive values via Math.Abs
While negative, the values collected actually represent positive numbers ...
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/e270cd0a-5295-41be-9e89-2c3dc3a39536?redirectedfrom=MSDN

It appears that min-value represents "N/A" data, or "Forever", so we'll record this value when resolving the property for this circumstance.

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Documentation updates are needed, and have been made accordingly.
  • I have added and/or updated tests to cover my changes.
  • All new and existing tests passed.
  • My changes include a database migration.

@definitelynotagoblin definitelynotagoblin self-assigned this Sep 13, 2024
@definitelynotagoblin definitelynotagoblin requested a review from a team as a code owner September 13, 2024 18:13
@definitelynotagoblin
Copy link
Contributor Author

Partial of #162, merging the latter.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants