4c737a9be42924e4203e7c6911ff55513e967ccb
MonotonicEntropy.random rejected a validly drawn value of 0 in its rejection-sampling loop, making an increment of exactly 1 unreachable for entropy sources without a fast Int63n path (e.g. crypto/rand.Reader). For inc == 2 this made the increment fully deterministic (always 2), contradicting the documented "random number between 1 and inc inclusive" contract. Restructure the loop to match the crypto/rand.Int pattern it is adapted from, so 0 is a valid draw and the result is correctly uniform over [1, inc].
Languages
Go
100%