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