mirror of https://github.com/xzeldon/htop.git
Fix process name updates for shorter strings (#812)
When a process name changes from a long string to a short string, truncate instead of just overwriting the beginning.
This commit is contained in:
parent
af92f0b8d6
commit
7ec5312974
|
@ -780,7 +780,7 @@ static bool LinuxProcessList_readCmdlineFile(Process* process, const char* dirna
|
|||
}
|
||||
command[lastChar + 1] = '\0';
|
||||
process->basenameOffset = tokenEnd;
|
||||
setCommand(process, command, lastChar);
|
||||
setCommand(process, command, lastChar + 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue