Fixed bug while reading a single space char

This commit is contained in:
Jesse Beder
2013-11-10 14:50:35 -06:00
parent 25881c4f96
commit 5b88931143
2 changed files with 9 additions and 1 deletions

View File

@@ -89,7 +89,7 @@ namespace YAML
const std::string& input = node.Scalar();\
std::stringstream stream(input);\
stream.unsetf(std::ios::dec);\
if((stream >> rhs) && (stream >> std::ws).eof())\
if((stream >> std::noskipws >> rhs) && (stream >> std::ws).eof())\
return true;\
if(std::numeric_limits<type>::has_infinity) {\
if(conversion::IsInfinity(input)) {\