aboutsummaryrefslogtreecommitdiff
path: root/poll.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2008-12-22 23:32:09 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2008-12-22 23:32:09 +0100
commitdb7c0a02cf5592b1b2406607d795230560fe547b (patch)
tree332e3fd7420f6e4c5f49198738b1599bf5d2e80d /poll.rb
parent7454ff48164046d37da97146e44fb01c9b666154 (diff)
bugfix: caused nullpointer exception when no Anonymous was added
Diffstat (limited to 'poll.rb')
-rw-r--r--poll.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/poll.rb b/poll.rb
index d706804..3f6773d 100644
--- a/poll.rb
+++ b/poll.rb
@@ -175,6 +175,7 @@ END
htmlname = CGI.escapeHTML(name.strip)
if htmlname == ""
maximum = @data.keys.collect{|e| e.scan(/^Anonymous #(\d*)/).flatten[0]}.compact.collect{|i| i.to_i}.max
+ maximum ||= 0
htmlname = "Anonymous ##{maximum + 1}"
name = htmlname
end