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

This commit is contained in:
Yoann Lecuyer 2019-08-02 22:19:57 +00:00 committed by Craig Small
parent 8145700899
commit 41805d8d89

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.