updated truncate_name method

This commit is contained in:
dqnk 2021-07-21 17:10:56 +02:00
parent 60586d38a9
commit d39d03f482

View file

@ -1008,8 +1008,11 @@ void uwu_name()
void truncate_name(char *name) void truncate_name(char *name)
{ {
for (int i = target_width; i < 256; i++) char arr[target_width];
name[i] = '\0';
for (int i = 0; i < target_width; i++)
arr[i] = name[i];
name = arr;
} }
// remove square brackets (for gpu names) // remove square brackets (for gpu names)