From e6edffa8d19a26e57c526f47f07b0f27c5e9a5cb Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 4 Nov 2012 19:42:32 -0800 Subject: [PATCH] Fixed off by one preventing printing of last line --- shpell.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shpell.hs b/shpell.hs index 33b4d3a..51ff01a 100644 --- a/shpell.hs +++ b/shpell.hs @@ -38,7 +38,7 @@ doInput filename contents colorFunc = do if not $ null comments then do mapM_ (\x -> do let lineNum = shpellLine (head x) - let line = if lineNum < 1 || lineNum >= lineCount + let line = if lineNum < 1 || lineNum > lineCount then "" else fileLines !! (lineNum - 1) putStrLn "" -- GitLab