diff --git a/pcp/PCPProcessList.c b/pcp/PCPProcessList.c index f544fd715..ef37da2de 100644 --- a/pcp/PCPProcessList.c +++ b/pcp/PCPProcessList.c @@ -281,7 +281,7 @@ static void PCPProcessList_updateCmdline(Process* process, int pid, int offset, ++command; --length; if (command[length-1] == ')') - command[length-1] = '\0'; + command[--length] = '\0'; process->isKernelThread = true; }