From 8e383dde3f186fe53fe59cda1c48519199bc12ca Mon Sep 17 00:00:00 2001 From: Rnhmjoj Date: Fri, 17 Oct 2014 00:13:12 +0200 Subject: [PATCH] Bugfix This crashed the program if you were very unlucky. --- Alea/Random.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alea/Random.hs b/Alea/Random.hs index 4902c83..f173e12 100644 --- a/Alea/Random.hs +++ b/Alea/Random.hs @@ -15,4 +15,4 @@ randPick ys n gen = (x : xs', gen'') -- Generate k random number in the range [0, n) randWords :: Int -> Int -> IO [Int] -randWords n k = getStdRandom (randPick [0..n] k) +randWords n k = getStdRandom (randPick [0..n-1] k)