summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/uniq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/uniq.c b/src/uniq.c
index 9c7e37c7b..b35938a19 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -222,8 +222,7 @@ find_field (struct linebuffer const *line)
i++;
}
- for (count = 0; count < skip_chars && i < size; count++)
- i++;
+ i += MIN (skip_chars, size - i);
return line->buffer + i;
}