diff options
author | Jim Meyering <jim@meyering.net> | 2000-06-20 06:46:28 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-06-20 06:46:28 +0000 |
commit | b1c4d0148a36e3688efe33a9fe56bcba4eba1c8d (patch) | |
tree | 301429a9c9f0c3b3d6af8fd5fa597a9bc05cdec0 /src | |
parent | 700b4bde5ed31dbecf4254c2c6bad7b0a5e79f34 (diff) | |
download | coreutils-b1c4d0148a36e3688efe33a9fe56bcba4eba1c8d.tar.xz |
(main): Fix off-by-argc test, so +N-style options are recognized once again.
Reported by Geoff Keunning.
Fix typo in diagnostic: s/compare/skip/.
Diffstat (limited to 'src')
-rw-r--r-- | src/uniq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uniq.c b/src/uniq.c index fa0fa0e5f..12964a030 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -428,7 +428,7 @@ main (int argc, char **argv) } } - if (optind >= 2 && !STREQ (argv[optind - 1], "--")) + if (argc - optind >= 2 && !STREQ (argv[optind - 1], "--")) { /* Interpret non-option arguments with leading `+' only if we haven't seen `--'. */ @@ -439,7 +439,7 @@ main (int argc, char **argv) if (xstrtol (opt_str, NULL, 10, &tmp_long, "") != LONGINT_OK || tmp_long <= 0 || tmp_long > INT_MAX) error (EXIT_FAILURE, 0, - _("invalid number of bytes to compare: `%s'"), + _("invalid number of bytes to skip: `%s'"), opt_str); skip_chars = (int) tmp_long; } |