GNU bug report logs - #12966
cut: Problems with overlapping, open-ended ranges

Previous Next

Package: coreutils;

Reported by: "Marcel Böhme" <hawkie <at> web.de>

Date: Fri, 23 Nov 2012 08:14:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: 12966 <at> debbugs.gnu.org, Marcel Böhme <hawkie <at> web.de>
Subject: bug#12966: cut: Problems with overlapping, open-ended ranges
Date: Sun, 25 Nov 2012 12:05:28 +0000
On 11/24/2012 07:40 PM, Jim Meyering wrote:

> diff --git a/src/cut.c b/src/cut.c
> index b464840..4219d24 100644
> --- a/src/cut.c
> +++ b/src/cut.c
> @@ -514,17 +514,18 @@ set_fields (const char *fieldstr)
>     /* Set the array entries corresponding to integers in the ranges of RP.  */
>     for (i = 0; i < n_rp; i++)
>       {
> -      size_t j;
> -      size_t rsi_candidate;
> +      /* Ignore any range that is subsumed by the to-EOL range.  */
> +      if (eol_range_start && eol_range_start <= rp[i].lo)
> +        continue;

looks good.

thanks,
Pádraig.




This bug report was last modified 12 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.