From e7ddbb822ac6251bc2204b86495d86f631937d1f Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 26 Nov 2006 20:23:23 +0000 Subject: bugs --- IkiWiki/Plugin/poll.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IkiWiki/Plugin/poll.pm') diff --git a/IkiWiki/Plugin/poll.pm b/IkiWiki/Plugin/poll.pm index b862ccdaa..e92d0292f 100644 --- a/IkiWiki/Plugin/poll.pm +++ b/IkiWiki/Plugin/poll.pm @@ -45,7 +45,7 @@ sub preprocess (@) { #{{{ my $ret=""; foreach my $choice (@choices) { - my $percent=int($choices{$choice} / $total * 100); + my $percent=$total > 0 ? int($choices{$choice} / $total * 100) : 0; if ($percent) { $ret.="$choice ($percent%) "; } -- cgit v1.2.3