From eaf92380163bdc165b52dc91f4427d017ee80592 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Tue, 21 Mar 1995 00:26:32 +0000 Subject: [PATCH] Fix wrong separator output Submitted by: julian Obtained from: newsgroup? --- usr.bin/cut/cut.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/cut/cut.c b/usr.bin/cut/cut.c index 25ffdd3b1bfe..2c887ff787e4 100644 --- a/usr.bin/cut/cut.c +++ b/usr.bin/cut/cut.c @@ -218,7 +218,8 @@ f_cut(fp, fname) int output; char lbuf[_POSIX2_LINE_MAX + 1]; - for (sep = dchar, output = 0; fgets(lbuf, sizeof(lbuf), fp);) { + for (sep = dchar; fgets(lbuf, sizeof(lbuf), fp);) { + output = 0; for (isdelim = 0, p = lbuf;; ++p) { if (!(ch = *p)) err("%s: line too long.\n", fname);