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 ""