ARM cpu detect: Only drop last character if it's actually a newline

This commit is contained in:
Henrik Rydgard 2014-12-22 00:19:59 +01:00
parent 951c5e7c0b
commit 6c3ef819e0

View File

@ -42,7 +42,8 @@ std::string GetCPUString()
if (line.find(marker) != std::string::npos)
{
cpu_string = line.substr(marker.length());
cpu_string.pop_back(); // Drop the new-line character
if (cpu_string.back() == '\n')
cpu_string.pop_back(); // Drop the new-line character
}
}