diff options
-rw-r--r-- | coreutils/seq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/seq.c b/coreutils/seq.c index 8be25360f..22bf3ec9d 100644 --- a/coreutils/seq.c +++ b/coreutils/seq.c | |||
@@ -86,7 +86,8 @@ int seq_main(int argc, char **argv) | |||
86 | v = first; | 86 | v = first; |
87 | n = 0; | 87 | n = 0; |
88 | while (increment >= 0 ? v <= last : v >= last) { | 88 | while (increment >= 0 ? v <= last : v >= last) { |
89 | printf("%s%0*.*f", sep, width, frac_part, v); | 89 | if (printf("%s%0*.*f", sep, width, frac_part, v) < 0) |
90 | break; /* I/O error, bail out (yes, this really happens) */ | ||
90 | sep = opt_s; | 91 | sep = opt_s; |
91 | /* v += increment; - would accumulate floating point errors */ | 92 | /* v += increment; - would accumulate floating point errors */ |
92 | n++; | 93 | n++; |