diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2019-10-18 19:56:48 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2019-10-18 19:56:48 -0500 |
| commit | 0d254d9cb83929511664f2dfe294e2e867b0c176 (patch) | |
| tree | 59f2470b9375067990ae4eff0edd58ed288a8b3d /Source/Core/Common/StringUtil.h | |
| parent | 4a613dad207b9426684ce52b3edd6b24a04356b5 (diff) | |
StringUtil: Require TryParse of float types to use the entire string.
Diffstat (limited to 'Source/Core/Common/StringUtil.h')
| -rw-r--r-- | Source/Core/Common/StringUtil.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/StringUtil.h b/Source/Core/Common/StringUtil.h index 9d9b59f323..b651910767 100644 --- a/Source/Core/Common/StringUtil.h +++ b/Source/Core/Common/StringUtil.h @@ -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; |
