diff options
author | Score_Under <seejay.11@gmail.com> | 2018-07-28 04:08:40 +0100 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-08-24 16:01:25 -0300 |
commit | 7ec5312974fdd882e6840162dd904ad692067a92 (patch) | |
tree | 29ee3e119beeacc94d9a01c15554dc6b2e21b1b0 | |
parent | af92f0b8d6d85c071d793730e825d956347e2630 (diff) |
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.
-rw-r--r-- | linux/LinuxProcessList.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 29ad4b7b..61501395 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -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; } |