shell.c: complain on insufficient arguments.

Originally noticed by Tommi Virtanen, but done slightly differently.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 2005-11-25 20:57:02 -08:00
parent 2a1ddc58e4
commit ab5f86275c
1 changed files with 1 additions and 2 deletions

View File

@ -5,8 +5,7 @@ static int do_generic_cmd(const char *me, char *arg)
{
const char *my_argv[4];

arg = sq_dequote(arg);
if (!arg)
if (!arg || !(arg = sq_dequote(arg)))
die("bad argument");

my_argv[0] = me;