summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2012-10-24 10:55:13 +0100
committerPádraig Brady <P@draigBrady.com>2012-10-25 13:01:13 +0100
commit0e3294131570837cba068a01ebcea10bdedd67b9 (patch)
tree68aaa906ca6739cb55cb4c67904d0b894180f770 /NEWS
parent88a6201917cad43fd4efea0f1c34c891b70a7414 (diff)
downloadcoreutils-0e3294131570837cba068a01ebcea10bdedd67b9.tar.xz
pr: fix -n to pad consistently and not crash
* src/pr.c: Replace the code to truncate the most significant digits of line numbers, with much simpler string manipulation that supports arbitrary widths. Before this, specifying a width >= 32 to -n would result in a divide by zero error. Also remove the inconsistent padding with zeros and spaces, which would result in zero padding for widths 12 and 15. * tests/pr/pr-tests.pl: Added a test to ensure no zero padding, and also a test for the divide by zero case. * NEWS: Mentioned the fix Reported by Ondrej Oprala
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS6
1 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 04721da5d..e13ba22a3 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU coreutils NEWS -*- outline -*-
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Bug fixes
+
+ pr -n no longer crashes when passed values >= 32. Also line numbers are
+ consistently padded with spaces, rather than with zeros for certain widths.
+ [bug introduced in TEXTUTILS-1_22i]
+
* Noteworthy changes in release 8.20 (2012-10-23) [stable]