summaryrefslogtreecommitdiff
path: root/coreutils/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/printf.c')
-rw-r--r--coreutils/printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c
index 5be3a67..5fd5ea3 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);
}