From 0d254d9cb83929511664f2dfe294e2e867b0c176 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Fri, 18 Oct 2019 19:56:48 -0500 Subject: [PATCH] StringUtil: Require TryParse of float types to use the entire string. --- Source/Core/Common/StringUtil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;