From 0639569dc1ebd4d19c373af96149cbb16a19e52d Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 12 Oct 2006 21:10:55 +0000 Subject: At least one argument is required. --- usr.bin/tput/tput.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'usr.bin/tput') diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c index a74e36a..a478d5d 100644 --- a/usr.bin/tput/tput.c +++ b/usr.bin/tput/tput.c @@ -81,6 +81,9 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (argc < 1) + usage(); + if (!term && !(term = getenv("TERM"))) errx(2, "no terminal type specified and no TERM environmental variable."); if (tgetent(tbuf, term) != 1) -- cgit v1.1