diff options
author | Pádraig Brady <P@draigBrady.com> | 2014-06-18 14:30:57 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-06-18 18:05:02 +0100 |
commit | 5ad16c2a0f11e48f1b1e3968b7b390591ce6f908 (patch) | |
tree | c4790e332c6cdc371a6c2cd8babe98979fd47d3a /src | |
parent | 8a51bd37362cdbfc2fab50458a67452a546dcfaf (diff) | |
download | coreutils-5ad16c2a0f11e48f1b1e3968b7b390591ce6f908.tar.xz |
seq: fix incorrect output with start or end of -0
* src/seq.c (main): Avoid seq_fast() with a start or end of -0.
* tests/misc/seq.pl: Add test cases.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/17800
Diffstat (limited to 'src')
-rw-r--r-- | src/seq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -604,7 +604,7 @@ main (int argc, char **argv) if (asprintf (&s2, "%0.Lf", last.value) < 0) xalloc_die (); - if (seq_fast (s1, s2)) + if (*s1 != '-' && *s2 != '-' && seq_fast (s1, s2)) { IF_LINT (free (s1)); IF_LINT (free (s2)); |