cut: fix regression in handling fields for lines wider than 64 chars (#1304839)
This commit is contained in:
parent
593569e76b
commit
06a5ca2716
@ -107,7 +107,7 @@
|
|||||||
/* Return nonzero if K'th byte is the beginning of a range. */
|
/* Return nonzero if K'th byte is the beginning of a range. */
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
@@ -505,23 +520,216 @@ cut_bytes (FILE *stream)
|
@@ -505,23 +520,215 @@ cut_bytes (FILE *stream)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read from stream STREAM, printing to standard output any selected fields. */
|
/* Read from stream STREAM, printing to standard output any selected fields. */
|
||||||
@ -210,10 +210,9 @@
|
|||||||
+ /* Here, if size < nmax, nchars_avail >= buffer_len + 1.
|
+ /* Here, if size < nmax, nchars_avail >= buffer_len + 1.
|
||||||
+ If size == nmax, nchars_avail > 0. */
|
+ If size == nmax, nchars_avail > 0. */
|
||||||
+
|
+
|
||||||
+ if (1 < nchars_avail)
|
+ if (1 < nchars_avail--)
|
||||||
+ {
|
+ {
|
||||||
+ mb_copy(read_pos++, &c);
|
+ mb_copy(read_pos++, &c);
|
||||||
+ --nchars_avail;
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ }
|
+ }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||||
Name: coreutils
|
Name: coreutils
|
||||||
Version: 8.25
|
Version: 8.25
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Url: http://www.gnu.org/software/coreutils/
|
Url: http://www.gnu.org/software/coreutils/
|
||||||
@ -349,6 +349,10 @@ fi
|
|||||||
%license COPYING
|
%license COPYING
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 15 2016 Ondrej Vasik <ovasik@redhat.com> - 8.25-4
|
||||||
|
- cut: fix regression in handling fields for lines wider
|
||||||
|
than 64 chars (#1304839)
|
||||||
|
|
||||||
* Thu Feb 11 2016 Lubomir Rintel <lkundrak@v3.sk> - 8.25-3
|
* Thu Feb 11 2016 Lubomir Rintel <lkundrak@v3.sk> - 8.25-3
|
||||||
- Fix a regression in unexpand empty line handling
|
- Fix a regression in unexpand empty line handling
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user