kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

NEW API. Hex Value always 0 #138

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.

    YAML::Node testNode = YAML::Load("0x05");
    printf("Output: %d ", testNode.as<int>());

Produces: Output 0

    YAML::Node testNode = YAML::Load("5");
    printf("Output: %d ", testNode.as<int>());

Produces: Output 5

2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
New API. Latest Checkout.

Please provide any additional information below.

Original issue reported on code.google.com by m...@riedel-privat.de on 10 Dec 2011 at 4:06

GoogleCodeExporter commented 8 years ago
Whoops, thanks for the report!

Original comment by jbe...@gmail.com on 10 Dec 2011 at 6:49

GoogleCodeExporter commented 8 years ago
This is true for octal values as well.  Also, I'm not sure if this should be 
considered a separate issue, but ".Inf" and ".NaN" don't seem to convert to 
float or double properly, raising an "unable to convert to type" error. I'd 
expect them to convert according to the regular expressions in the Core Schema 
spec at http://www.yaml.org/spec/1.2/spec.html#schema/core/ .

Original comment by geoff.ad...@gmail.com on 21 Dec 2011 at 12:08

GoogleCodeExporter commented 8 years ago
Fixed, 0e8dae6ad98e. Thanks!

Original comment by jbe...@gmail.com on 13 Jan 2012 at 5:55