Fix parsing of multiple quoted parameters

This should Fix #262
This commit is contained in:
Davipb
2016-11-19 10:56:17 -02:00
parent d1b25011dd
commit b0286975cd

View File

@@ -65,7 +65,9 @@ namespace Discord.Commands
return ParseResult.FromError(CommandError.ParseFailed, "There must be at least one character of whitespace between arguments.");
else
{
curParam = command.Parameters.Count > argList.Count ? command.Parameters[argList.Count] : null;
if (curParam == null)
curParam = command.Parameters.Count > argList.Count ? command.Parameters[argList.Count] : null;
if (curParam != null && curParam.IsRemainder)
{
argBuilder.Append(c);
@@ -116,11 +118,7 @@ namespace Discord.Commands
{
paramList.Add(typeReaderResult);
if (curPos == endPos)
{
curParam = null;
curPart = ParserPart.None;
}
curPart = ParserPart.None;
}
else
{