diff --git a/src/Mtlstats/Report.hs b/src/Mtlstats/Report.hs index 17a5b8a..aec4cb9 100644 --- a/src/Mtlstats/Report.hs +++ b/src/Mtlstats/Report.hs @@ -150,7 +150,7 @@ playerReport width label ps = let playerNameColWidth :: [Player] -> Int playerNameColWidth = foldr - (\player current -> max current $ length $ player^.pName) + (\player current -> max current $ succ $ length $ player^.pName) 10 showStats :: GameStats -> String diff --git a/test/ReportSpec.hs b/test/ReportSpec.hs index a42d993..e3b0bab 100644 --- a/test/ReportSpec.hs +++ b/test/ReportSpec.hs @@ -61,5 +61,5 @@ playerNameColWidthSpec = describe "playerNameColWidth" $ do -- label, players, expected [ ( "empty list", [], 10 ) , ( "short names", [short1, short2], 10 ) - , ( "long name", [short1, long], 15 ) + , ( "long name", [short1, long], 16 ) ]