kastnermario / yaml-cpp

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

An input ".inf" etc. causes YAML::InvalidScalar #109

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. compile attached source against yaml-cpp 0.2.6
2. run it with the attached test.yaml input

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

Expected output is:

inf
1
2
3
inf

Instead we get

inf
1
2
3
terminate called after throwing an instance of 'YAML::InvalidScalar'
  what():  yaml-cpp: error at line 4, column 4: invalid scalar

What version of the product are you using? On what operating system?

yaml-cpp 0.2.6 (macports: @0.2.6_0)
Mac OS X 10.6.7

Please provide any additional information below.

".Inf" and ".nan" also fail.

Original issue reported on code.google.com by rctho...@lbl.gov on 10 Jul 2011 at 12:52

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! This should be fixed in r485.

Original comment by jbe...@gmail.com on 10 Jul 2011 at 4:28

GoogleCodeExporter commented 8 years ago
Thanks!

One little thing though, "-.inf" or "-.Inf" etc. should parse to negative 
infinity, I believe, not a positive one.

Original comment by rctho...@lbl.gov on 10 Jul 2011 at 5:12

GoogleCodeExporter commented 8 years ago
Whoops, you're right!

Original comment by jbe...@gmail.com on 10 Jul 2011 at 6:24

GoogleCodeExporter commented 8 years ago
Fixed, r486.

Original comment by jbe...@gmail.com on 10 Jul 2011 at 6:30