Skip to content

Commit

Permalink
fixed again (rand.Intn param - 1 is max value)
Browse files Browse the repository at this point in the history
  • Loading branch information
knoxfighter committed Jul 1, 2020
1 parent 6097487 commit d834cf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fwew.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func Random(amount int, args []string) (results []Word, err error) {

// create random number
if amount <= 0 {
amount = rand.Intn(dictLength-1) + 1
amount = rand.Intn(dictLength) + 1
}

if amount > dictLength {
Expand Down

0 comments on commit d834cf3

Please sign in to comment.