Skip to content

Commit

Permalink
Merge branch 'fix-strip-exe-from-cmdline' of benbe/htop
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lange authored and Daniel Lange committed May 31, 2022
2 parents ce50095 + 9eed309 commit 2613db4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Process.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,11 +601,15 @@ void Process_makeCommandStr(Process* this) {
}

if (matchLen) {
/* strip the matched exe prefix */
cmdline += matchLen;
if (stripExeFromCmdline) {
/* strip the matched exe prefix */
cmdline += matchLen;

commStart -= matchLen;
commEnd -= matchLen;
commStart -= matchLen;
commEnd -= matchLen;
} else {
matchLen = 0;
}
}

if (!matchLen || (haveCommField && *cmdline)) {
Expand Down

0 comments on commit 2613db4

Please sign in to comment.