top: fix out-of-band read when using -p with exactly 20 pids

This commit is contained in:
Yoann Lecuyer authored and Craig Small committed 2019-09-21 17:07:41 +10:00
1 parent 8145700899
commit 41805d8d89
1 file changed
+1 -1
+1 -1
View File
@@ -97,7 +97,7 @@ static float Cpu_pmax;
static const char *Cpu_States_fmts;
/* Specific process id monitoring support */
static pid_t Monpids [MONPIDMAX] = { 0 };
static pid_t Monpids [MONPIDMAX+1] = { 0 };
static int Monpidsidx = 0;
/* Current screen dimensions.