ps: ensure fields are separated by at least one space, closes 11826
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
b052dbea54
commit
3106784e65
@ -533,7 +533,7 @@ static void format_process(const procps_status_t *ps)
|
|||||||
len = out[i].width - len + 1;
|
len = out[i].width - len + 1;
|
||||||
if (++i == out_cnt) /* do not pad last field */
|
if (++i == out_cnt) /* do not pad last field */
|
||||||
break;
|
break;
|
||||||
p += sprintf(p, "%*s", len, "");
|
p += sprintf(p, "%*s", len, " "); /* " ", not "", to ensure separation of fields */
|
||||||
}
|
}
|
||||||
printf("%.*s\n", terminal_width, buffer);
|
printf("%.*s\n", terminal_width, buffer);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user