From 81cb73491084dd9b9cd8acaedcd099a2a29f6be6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 25 Aug 2001 05:42:46 +0000 Subject: (find_field): Don't count trailing newline to be part of the field. This disagrees with POSIX.2, but it's gotta be a bug in the standard. An interpretations request has been submitted to PASC. --- src/uniq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uniq.c b/src/uniq.c index f46bdaa52..42f33a206 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -169,7 +169,7 @@ find_field (const struct linebuffer *line) { register int count; register char *lp = line->buffer; - register size_t size = line->length; + register size_t size = line->length - 1; register size_t i = 0; for (count = 0; count < skip_fields && i < size; count++) -- cgit v1.2.3-54-g00ecf