-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When querying nodes with value 0, get_value<int>()
and get_value<float>()
will throw exception with message
Floating point value underflow detected.
It is suspected that a prior check on whether the value is zero should be conducted
Reproduction steps
Use yaml file (e.g. test.yaml
)
pos: [0.0, 0.0, 0.0]
and c++ code
std::ifstream ifs("test.yaml");
fkyaml::node root = fkyaml::node::deserialize(ifs);
auto posNode = root["pos"];
float posX = posNode[0].get_value<float>(); // throws exception reporting underflow
Expected vs. actual results
Expected: reading in 0 correctly.
Actual: throwing exception "Floating point value underflow detected."
Minimal code example
No response
Error messages
No response
Compiler and operating system
g++; Windows
Library version
v0.3.8
Validation
- The bug also occurs if the latest version from the
develop
branch is used. - I can successfully compile and run the unit tests.
fktn-k
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working