commands: Fixed arg validation bug

This commit is contained in:
Matt Bell 2014-11-04 23:39:12 -08:00 committed by Juan Batiz-Benet
parent 1ee6c7e5f2
commit fecb434ab4

View File

@ -179,7 +179,7 @@ func (c *Command) CheckArguments(req Request) error {
// any additional values are for the variadic arg definition
if argDef.Variadic && j < len(args)-1 {
for _, val := range args[j+1:] {
for _, val := range args[j:] {
err := checkArgValue(val, argDef)
if err != nil {
return err