Skip to content

Commit

Permalink
bug: fixed bug when using function RandomString and RandomStringVocab…
Browse files Browse the repository at this point in the history
…ulary with min = max
  • Loading branch information
ugol committed Oct 3, 2024
1 parent 15cfd2d commit 5f3e919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/functions/nonsense.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func RandomString(min, max int) string {

// RandomStringVocabulary returns a random string long between min and max characters using a vocabulary
func RandomStringVocabulary(min, max int, source string) string {
textb := make([]byte, min+Random.Intn(max-min))
textb := make([]byte, min+Random.Intn(max-min+1))
for i := range textb {
textb[i] = source[Random.Intn(len(source))]
}
Expand Down

0 comments on commit 5f3e919

Please sign in to comment.