aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix')
-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 6a9676c0..4c66bcd6 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -593,7 +593,10 @@ static void show_ps(struct carveup *tb)
len = pad = abslen;
pad *= sign;
// If last field is left justified, no trailing spaces.
- if (!field->next && sign<0) pad = 0;
+ if (!field->next && sign<0) {
+ pad = 0;
+ len = width;
+ }
if (TT.tty) width -= draw_trim(out, pad, len);
else width -= printf("%*.*s", pad, len, out);