commit f8db4fbae2bf9a5f3a717e7b243f45492c94ff66
parent 898902f0283ce686c4c41eb767e9efa3f068000b
Author: sam-barr <samfbarr@outlook.com>
Date: Sun, 26 Apr 2020 23:51:48 -0500
Trim spaces off the front of CPU and GPU
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/paleofetch.c b/paleofetch.c
@@ -377,7 +377,7 @@ char *get_cpu() {
char *cpu = malloc(BUF_SIZE);
snprintf(cpu, BUF_SIZE, "%s (%d) @ %.*fGHz", cpu_model, num_cores, prec, freq);
free(cpu_model);
-
+ while(*cpu == ' ') cpu++;
truncate_spaces(cpu);
return cpu;
}
@@ -420,7 +420,7 @@ char *find_gpu(int index) {
for (int i = 0; i < COUNT(gpu_remove); ++i) {
remove_substring(gpu, gpu_remove[i].substring, gpu_remove[i].length);
}
-
+ while(*gpu == ' ') gpu++;
truncate_spaces(gpu);
return gpu;