ARM cpu detect: Only drop last character if it's actually a newline
This commit is contained in:
parent
951c5e7c0b
commit
6c3ef819e0
1 changed files with 2 additions and 1 deletions
|
@ -42,7 +42,8 @@ std::string GetCPUString()
|
||||||
if (line.find(marker) != std::string::npos)
|
if (line.find(marker) != std::string::npos)
|
||||||
{
|
{
|
||||||
cpu_string = line.substr(marker.length());
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue