diff options
Diffstat (limited to 'coreutils/length.c')
-rw-r--r-- | coreutils/length.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/length.c b/coreutils/length.c index 46242b529..2c83cdfd2 100644 --- a/coreutils/length.c +++ b/coreutils/length.c | |||
@@ -6,7 +6,7 @@ | |||
6 | extern int | 6 | extern int |
7 | length_main(int argc, char * * argv) | 7 | length_main(int argc, char * * argv) |
8 | { | 8 | { |
9 | if ( **(argv+1) == '-' ) { | 9 | if ( argc != 2 || **(argv+1) == '-' ) { |
10 | usage("length string\n"); | 10 | usage("length string\n"); |
11 | } | 11 | } |
12 | printf("%d\n", strlen(argv[1])); | 12 | printf("%d\n", strlen(argv[1])); |