diff --git a/top/top.c b/top/top.c index 2af2a849..0629b1b3 100644 --- a/top/top.c +++ b/top/top.c @@ -1963,7 +1963,7 @@ static void calibrate_fields (void) { s = scat(s, fmtmk("%*.*s", len, len, h)); } #ifndef USE_X_COLHDR - if (EU_XON == w->procflgs[i - 1]) --i; + if (i >= 1 && EU_XON == w->procflgs[i - 1]) --i; #endif /* establish the final maxpflgs and prepare to grow the variable column @@ -1977,6 +1977,7 @@ static void calibrate_fields (void) { fit within screen width, including a leading window number */ *(s = w->columnhdr) = '\0'; if (Rc.mode_altscr) s = scat(s, " "); + w->endpflg = 0; for (i = w->totpflgs - 1; -1 < i; i--) { f = w->pflgsall[i]; #ifndef USE_X_COLHDR