From 377bc7bbb738bdd3e44a63b98cc1746b348c9ff2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 25 May 2013 17:55:31 -0400 Subject: [PATCH] fix --- Command/FuzzTest.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Command/FuzzTest.hs b/Command/FuzzTest.hs index df54e90b0d..29ee51ef28 100644 --- a/Command/FuzzTest.hs +++ b/Command/FuzzTest.hs @@ -222,11 +222,11 @@ existingFile n top = maybe (return Nothing) (go . toFilePath) =<< existingDir if null dirs then return Nothing else do - n <- getStdRandom $ randomR (0, length dirs - 1) - existingFile (n - 1) (top dirs !! n) + i <- getStdRandom $ randomR (0, length dirs - 1) + existingFile (n - 1) (top dirs !! i) else do - n <- getStdRandom $ randomR (0, length files - 1) - return $ Just $ FuzzFile $ top dir files !! n + i <- getStdRandom $ randomR (0, length files - 1) + return $ Just $ FuzzFile $ top dir files !! i existingDir :: IO (Maybe FuzzDir) existingDir = do