From 7eb49b5c061d88eb3bb8ebcd783cc8958f96d2cc Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 7 Feb 1999 21:40:50 +0000 Subject: fix fold -s early break; helbig@Informatik.BA-Stuttgart.DE --- usr.bin/fold/fold.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/fold/fold.c b/usr.bin/fold/fold.c index 5f3c47c8bf9..abd783848aa 100644 --- a/usr.bin/fold/fold.c +++ b/usr.bin/fold/fold.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fold.c,v 1.2 1996/06/26 05:33:23 deraadt Exp $ */ +/* $OpenBSD: fold.c,v 1.3 1999/02/07 21:40:49 deraadt Exp $ */ /* $NetBSD: fold.c,v 1.6 1995/09/01 01:42:44 jtc Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)fold.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: fold.c,v 1.2 1996/06/26 05:33:23 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fold.c,v 1.3 1999/02/07 21:40:49 deraadt Exp $"; #endif /* not lint */ #include @@ -168,7 +168,7 @@ fold(width) indx -= last_space; col = 0; for (i = 0; i < indx; i++) { - col = new_column_position (col, ch); + col = new_column_position (col, buf[i]); } } else { fwrite (buf, 1, indx, stdout); -- cgit v1.2.3