From f5df644b423b7f2e984086655b59952ae2f34b53 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 17 Nov 2004 10:09:44 +0000 Subject: [PATCH] Always use the width field from the varent, not the original width. This fixes the output of oversized fields messing the overall table layout. Reported-by: Peter Avalos --- bin/ps/ps.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 4a0fdd704f..d9d6388de3 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1990, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)ps.c 8.4 (Berkeley) 4/2/94 * $FreeBSD: src/bin/ps/ps.c,v 1.30.2.6 2002/07/04 08:30:37 sobomax Exp $ - * $DragonFly: src/bin/ps/ps.c,v 1.14 2004/11/16 12:16:36 joerg Exp $ + * $DragonFly: src/bin/ps/ps.c,v 1.15 2004/11/17 10:09:44 joerg Exp $ */ #include @@ -478,7 +478,7 @@ scanvars(void) STAILQ_FOREACH(vent, &var_head, link) { v = vent->var; if (v->flag & DSIZ) { - vent->dwidth = v->width; + vent->dwidth = vent->width; vent->width = 0; } if (v->flag & USER) @@ -500,9 +500,9 @@ dynsizevars(KINFO *ki) if (!(v->flag & DSIZ)) continue; i = (v->sproc)( ki); - if (v->width < i) + if (vent->width < i) vent->width = i; - if (v->width > vent->dwidth) + if (vent->width > vent->dwidth) vent->width = vent->dwidth; } } -- 2.41.0