summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob P. Liljenberg <admin@qvantnet.com>2023-12-12 21:48:55 +0100
committerGitHub <noreply@github.com>2023-12-12 21:48:55 +0100
commitcfd20a374b11b75d73e043979d0b6dd4314d2919 (patch)
tree8de419faa97c457c34cdc00b28ca259ec1902f90
parent14e664e7564f595d911e462414357caade91eede (diff)
parentb6a86962e23422b6f09ea40347cd4a7a49ae6647 (diff)
Merge pull request #677 from imwints/cpu-model
-rw-r--r--src/linux/btop_collect.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp
index 4bb5e71..ab4574f 100644
--- a/src/linux/btop_collect.cpp
+++ b/src/linux/btop_collect.cpp
@@ -339,7 +339,7 @@ namespace Cpu {
}
- auto name_vec = ssplit(name);
+ auto name_vec = ssplit(name, ' ');
if ((s_contains(name, "Xeon"s) or v_contains(name_vec, "Duo"s)) and v_contains(name_vec, "CPU"s)) {
auto cpu_pos = v_index(name_vec, "CPU"s);
@@ -355,7 +355,7 @@ namespace Cpu {
}
else if (s_contains(name, "Intel"s) and v_contains(name_vec, "CPU"s)) {
auto cpu_pos = v_index(name_vec, "CPU"s);
- if (cpu_pos < name_vec.size() - 1 and not name_vec.at(cpu_pos + 1).ends_with(')') and name_vec.at(cpu_pos + 1) != "@")
+ if (cpu_pos < name_vec.size() - 1 and not name_vec.at(cpu_pos + 1).ends_with(')') and name_vec.at(cpu_pos + 1).size() != 1)
name = name_vec.at(cpu_pos + 1);
else
name.clear();