From 7061c33d7b516ca457126be8c9ff6f6dc19f1919 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 19 Dec 1993 06:20:51 +0000 Subject: [PATCH] (set_fields): Convert ranges like 3-5,6- into 3-. Before, this was off-by-two and converted 3-5,4-, but not 3-5,5- --- src/cut.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cut.c b/src/cut.c index 54855cbc29..da32597f47 100644 --- a/src/cut.c +++ b/src/cut.c @@ -353,9 +353,11 @@ set_fields (fieldstr) /* No, the new sequence starts before the old. Does the old range going to end of line extend into the new range? */ - if (eol_range_start < value) + if (value >= eol_range_start - 1) + { /* Yes. Simply move the end of line marker. */ eol_range_start = initial; + } else { /* No. A simple range, before and disjoint from -- 2.47.3