From 61db7c0e174f9fa0488a658d2aeb811928b512f2 Mon Sep 17 00:00:00 2001 From: undeath Date: Wed, 14 Mar 2012 15:46:47 +0100 Subject: [PATCH] Fixed CharacterFrequencyAgent outputting more than 50 chars in "Top 50 characters" statistic --- passpal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passpal.rb b/passpal.rb index 3c2066b..144712c 100644 --- a/passpal.rb +++ b/passpal.rb @@ -491,7 +491,7 @@ def report }) "Total characters: \t" + @charCount.to_s + "\nUnique characters: \t" + unique.to_s + - "\nTop 50 characters: \t" + '' + charset_string + + "\nTop 50 characters: \t" + '' + charset_string[0..49] + "\n\nCharacter frequency, sorted by count, top " + $top.to_s + "\n" + table.sub_table(0...$top.to_i).to_s end end