Fixed nullrefs in command parsing

This commit is contained in:
RogueException
2016-08-21 11:07:32 -03:00
parent 324664917d
commit 99e9c36a69
2 changed files with 8 additions and 4 deletions

View File

@@ -156,7 +156,7 @@ namespace Discord.Commands
return ParseResult.FromError(CommandError.ParseFailed, "A quoted parameter is incomplete");
//Add missing optionals
for (int i = paramList.Count; i < command.Parameters.Count; i++)
for (int i = argList.Count; i < command.Parameters.Count; i++)
{
var param = command.Parameters[i];
if (!param.IsOptional)