Merge branch 'fix-strip-exe-from-cmdline' of benbe/htop

This commit is contained in:
Daniel Lange 2022-05-31 09:29:11 +02:00
commit 2613db4b0d
1 changed files with 8 additions and 4 deletions

View File

@ -601,11 +601,15 @@ void Process_makeCommandStr(Process* this) {
} }
if (matchLen) { if (matchLen) {
if (stripExeFromCmdline) {
/* strip the matched exe prefix */ /* strip the matched exe prefix */
cmdline += matchLen; cmdline += matchLen;
commStart -= matchLen; commStart -= matchLen;
commEnd -= matchLen; commEnd -= matchLen;
} else {
matchLen = 0;
}
} }
if (!matchLen || (haveCommField && *cmdline)) { if (!matchLen || (haveCommField && *cmdline)) {