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 c717c79 commit b7d8c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mutator/mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewMutator(r *rand.Rand) *Mutator {
}

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

0 comments on commit b7d8c8d

Please sign in to comment.