Skip to content

Commit

Permalink
Update mockgen.go
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRPorter committed Jun 11, 2024
1 parent 0fe1da0 commit 54c3d6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mockgen/mockgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func (g *generator) generateOngoingVerificationGetAllCapturedArguments(ongoingVe
break
} else {
// explicitly validate the length of the params slice to avoid out of bounds code smells
g.p("if %v < len(_params) {", i)
g.p("if len(_params) > %v {", i)
g.p("_param%v = make([]%v, len(c.methodInvocations))", i, argType)
g.p("for u, param := range _params[%v] {", i)
g.p("_param%v[u]=param.(%v)", i, argType)
Expand Down

0 comments on commit 54c3d6e

Please sign in to comment.