f1b148
diff -up ./src/pstree.c.ori ./src/pstree.c
f1b148
--- ./src/pstree.c.ori	2017-06-12 02:24:29.089210495 +0200
f1b148
+++ ./src/pstree.c	2020-07-03 21:24:47.257760342 +0200
f1b148
@@ -530,8 +530,12 @@ static void set_args(PROC * this, const
f1b148
     }
f1b148
     this->argc = 0;
f1b148
     for (i = 0; i < size - 1; i++)
f1b148
-        if (!args[i])
f1b148
+        if (!args[i]) {
f1b148
             this->argc++;
f1b148
+            /* now skip consecutive NUL */
f1b148
+            while(!args[i] && (i < size -1 ))
f1b148
+                i++;
f1b148
+        }
f1b148
     if (!this->argc)
f1b148
         return;
f1b148
     if (!(this->argv = malloc(sizeof(char *) * this->argc))) {