From dd7fe9c807b974902a5d8e571ab65c39885554b1 Mon Sep 17 00:00:00 2001 From: undeath Date: Fri, 24 Feb 2012 12:50:15 +0100 Subject: [PATCH] fixed crash in BaseWordFrequencyAgent when using --top switch --- passpal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passpal.rb b/passpal.rb index f8b75ea..3c2066b 100644 --- a/passpal.rb +++ b/passpal.rb @@ -171,7 +171,7 @@ def analyze(word) end def report output = [] - while (@words.length > 0 && output.length < $top) + while (@words.length > 0 && output.length < $top.to_i) max_value = 0 max_key = nil @words.each do |key, value|