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 validation of MS-05 NcFloat32 values. #400

Merged
merged 3 commits into from
Jul 26, 2024

Conversation

jonathan-r-thorpe
Copy link
Contributor

  • Validation check for NcFloat32 was enforcing values between std::numeric_limits<float_t>::min and std::numeric_limits<float_t>::max.
  • However, std::numeric_limits<float_t>::min is the lowest positive float value and so legitimate float32 numbers including 0.0 and all negative floats fail the validation.
  • ::min has been replaced with ::lowest.
  • A regression test has also been added.

Copy link
Contributor

@lo-simon lo-simon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small change, rest LGTM

Development/nmos/test/control_protocol_test.cpp Outdated Show resolved Hide resolved
@jonathan-r-thorpe jonathan-r-thorpe merged commit f4c676c into master Jul 26, 2024
22 checks passed
@jonathan-r-thorpe jonathan-r-thorpe deleted the is-12-primitive-validation-fix branch July 26, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants