diff options
author | Score_Under <seejay.11@gmail.com> | 2018-07-28 04:08:40 +0100 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-28 00:08:40 -0300 |
commit | d74b6dc8e0f51b6b6fb2253bfcdbb86ea46774d7 (patch) | |
tree | f47b467378e8351aeb936f7666dea9bcb8777166 /linux | |
parent | 666e1e76b39ee66a38f5fb620d22b23f36859eca (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.
Diffstat (limited to 'linux')
-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 2edd0425..27ead28a 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -709,7 +709,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; } |