mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 16:00:39 +01:00
Fix spaces bug in CPU name
This commit is contained in:
@@ -155,6 +155,9 @@ char* get_str_cpu_name_internal() {
|
||||
//Remove unused characters
|
||||
char *str = name;
|
||||
char *dest = name;
|
||||
// Remove spaces before name
|
||||
while (*str != '\0' && *str == ' ')str++;
|
||||
// Remove spaces between the name and after it
|
||||
while (*str != '\0') {
|
||||
while (*str == ' ' && *(str + 1) == ' ') str++;
|
||||
*dest++ = *str++;
|
||||
|
||||
Reference in New Issue
Block a user