diff options
Diffstat (limited to 'coreutils/printf.c')
-rw-r--r-- | coreutils/printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c index 5be3a67cb..5fd5ea303 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -143,7 +143,7 @@ printf_main(int argc, char** argv) int args_used; exit_status = 0; - if ( **(argv+1) == '-' ) { + if ( argc <= 1 || **(argv+1) == '-' ) { usage (printf_usage); } |