aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/ps.c')
-rw-r--r--toys/posix/ps.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index bcf1e714..41ddf6a4 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -585,7 +585,10 @@ static void show_ps(void *p)
pad *= sign;
// If last field is left justified, no trailing spaces.
- if (!field->next && sign<0) pad = -1;
+ if (!field->next && sign<0) {
+ pad = -1;
+ len = width;
+ }
// If we truncated a left-justified field, show + instead of last char
if (olen>len && len>1 && sign<0) {