Skip to content

Commit

Permalink
mutator: fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Sep 18, 2023
1 parent c9ad021 commit c717c79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mutator/mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ func NewMutator(r *rand.Rand) *Mutator {
}

func (m *Mutator) rand(n int) int {
if n == 0 {
return 0
}
return m.r.Intn(n)
}

Expand Down

0 comments on commit c717c79

Please sign in to comment.