aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/poll.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-26 20:23:23 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-26 20:23:23 +0000
commite7ddbb822ac6251bc2204b86495d86f631937d1f (patch)
treeabe0bb27665e7268fad696244c2408871982cd0c /IkiWiki/Plugin/poll.pm
parentfb796fa725413b0404a05b44ced6e3216304ab08 (diff)
downloadikiwiki-e7ddbb822ac6251bc2204b86495d86f631937d1f.tar
ikiwiki-e7ddbb822ac6251bc2204b86495d86f631937d1f.tar.gz
bugs
Diffstat (limited to 'IkiWiki/Plugin/poll.pm')
-rw-r--r--IkiWiki/Plugin/poll.pm2
1 files changed, 1 insertions, 1 deletions
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%) ";
}