Merge pull request #110 from dqnk/main
Updated truncate_name, fixes #108
This commit is contained in:
commit
4c16fe2105
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue