diff options
author | Joey Hess <joey@kitenet.net> | 2013-05-25 17:55:31 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-25 17:55:31 -0400 |
commit | 5574e612b21f9103d71cb51610710fbd8a6791d9 (patch) | |
tree | 682b782af563375885d799a85a0d876e8db722e3 /Command/FuzzTest.hs | |
parent | 626eabccef7a9a01ab1b2671c8c3b28f7baa96ce (diff) |
fix
Diffstat (limited to 'Command/FuzzTest.hs')
-rw-r--r-- | Command/FuzzTest.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/FuzzTest.hs b/Command/FuzzTest.hs index df54e90b0..29ee51ef2 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 |