summaryrefslogtreecommitdiff
path: root/src/uniq.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-08-25 05:42:46 +0000
committerJim Meyering <jim@meyering.net>2001-08-25 05:42:46 +0000
commit81cb73491084dd9b9cd8acaedcd099a2a29f6be6 (patch)
tree563b0ce2f3b00b935bc87e2f2db6dca7d0efbb33 /src/uniq.c
parent90790efabe7900cf3c47fe63d7ccae6316fb1a00 (diff)
downloadcoreutils-81cb73491084dd9b9cd8acaedcd099a2a29f6be6.tar.xz
(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.
Diffstat (limited to 'src/uniq.c')
-rw-r--r--src/uniq.c2
1 files changed, 1 insertions, 1 deletions
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++)