From 6c3ef819e0fa0840a36a78966b730a1e3635501c Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Mon, 22 Dec 2014 00:19:59 +0100 Subject: [PATCH] ARM cpu detect: Only drop last character if it's actually a newline --- Common/ArmCPUDetect.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/ArmCPUDetect.cpp b/Common/ArmCPUDetect.cpp index 8123fed69..0d24776e2 100644 --- a/Common/ArmCPUDetect.cpp +++ b/Common/ArmCPUDetect.cpp @@ -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 } }