forked from OSchip/llvm-project
Fixing a crashing bug in multiword commands from William Lynch.
llvm-svn: 108958
This commit is contained in:
parent
471b31ce62
commit
ede0585ec2
|
@ -290,13 +290,12 @@ CommandObjectMultiword::HandleCompletion
|
|||
const char *
|
||||
CommandObjectMultiword::GetRepeatCommand (Args ¤t_command_args, uint32_t index)
|
||||
{
|
||||
if (current_command_args.GetArgumentCount() == 0)
|
||||
return NULL;
|
||||
index++;
|
||||
if (current_command_args.GetArgumentCount() <= index)
|
||||
return NULL;
|
||||
CommandObject *sub_command_object = GetSubcommandObject (current_command_args.GetArgumentAtIndex(index));
|
||||
if (sub_command_object == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return sub_command_object->GetRepeatCommand(current_command_args, index);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue