aboutsummaryrefslogtreecommitdiff
path: root/toys/lsb/seq.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-09-05 05:46:35 -0500
committerRob Landley <rob@landley.net>2015-09-05 05:46:35 -0500
commit73eca9182dfd7c2d52775ca24da6a7a0d55b3cee (patch)
tree0dcbf9b1d058d131ddbbdec9bcc759287999d071 /toys/lsb/seq.c
parent091997e4c6f5655876a3133ae80b52c2d91a8216 (diff)
downloadtoybox-73eca9182dfd7c2d52775ca24da6a7a0d55b3cee.tar.gz
Add seq -f tests, tweak help text, and catch one more error case.
Diffstat (limited to 'toys/lsb/seq.c')
-rw-r--r--toys/lsb/seq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/lsb/seq.c b/toys/lsb/seq.c
index 322940b3..f1ca0d00 100644
--- a/toys/lsb/seq.c
+++ b/toys/lsb/seq.c
@@ -17,7 +17,7 @@ config SEQ
to 1. Two arguments are used as first and last. Arguments can be
negative or floating point.
- -f Use fmt_str as a floating point format string
+ -f Use fmt_str as a printf-style floating point format string
-s Use sep_str as separator, default is a newline character
*/
@@ -47,7 +47,7 @@ static void insanitize(char *f)
}
// The @ is a byte offset, not utf8 chars. Waiting for somebody to complain...
- if (*s) error_exit("bad -f '%s'@%d", f, s-f+1);
+ if (*s || !found) error_exit("bad -f '%s'@%d", f, s-f+1);
}
void seq_main(void)