amueller / word_cloud

A little word cloud generator in Python
https://amueller.github.io/word_cloud
MIT License
10.1k stars 2.31k forks source link

Fixed random location range #684

Open 9r0x opened 2 years ago

9r0x commented 2 years ago

Please correct me if I am wrong: Random.randint(a,b) is [a,b] inclusive, while a valid location is [1,hits].

This bug may miss a few valid positions when goal is 0, especially likely whenhits is small.