diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index b2f46f091..596898da6 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -127,7 +127,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) { if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) { if (num >= (std::numeric_limits::min)() && num <= (std::numeric_limits::max)()) { - rhs = num; + rhs = (T)num; return true; } }