diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp index cdd1016210..664987d350 100644 --- a/Source/Core/Common/Src/StringUtil.cpp +++ b/Source/Core/Common/Src/StringUtil.cpp @@ -125,6 +125,10 @@ std::string StripQuotes(const std::string& s) bool TryParse(const std::string &str, u32 *const output) { char *endptr = NULL; + + // Reset errno to a value other than ERANGE + errno = 0; + unsigned long value = strtoul(str.c_str(), &endptr, 0); if (!endptr || *endptr)