Skip to content
Permalink
Browse files
Merge pull request #8415 from jordan-woyak/try-parse
StringUtil: Require TryParse of float types to use the entire string.
  • Loading branch information
lioncash committed Oct 20, 2019
2 parents da22109 + 0d254d9 commit d0114ea
Showing 1 changed file with 1 addition and 1 deletion.
@@ -61,7 +61,7 @@ static bool TryParse(const std::string& str, N* const output)
iss.imbue(std::locale("C"));

N tmp;
if (iss >> tmp)
if (iss >> tmp && iss.eof())
{
*output = tmp;
return true;

0 comments on commit d0114ea

Please sign in to comment.