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