summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-26 20:52:37 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-26 20:52:37 +0000
commit278ea6e03720db50312c8cdcbf6a891e4f2fba63 (patch)
tree780b91f1e41702341688514011ffab87ce8d70f3 /IkiWiki/Plugin
parent42ab1bf185dff5803b4cddf4b0b22c8d4ea5b90d (diff)
bugfix
Diffstat (limited to 'IkiWiki/Plugin')
-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 bca8f5d54..d598c3208 100644
--- a/IkiWiki/Plugin/poll.pm
+++ b/IkiWiki/Plugin/poll.pm
@@ -108,7 +108,7 @@ sub cgi ($) { #{{{
if (--$num == 0) {
$params=~s/(^|\s+)(\d+)\s+"?\Q$choice\E"?(\s+|$)/$1.($2+1)." \"$choice\"".$3/se;
if (defined $oldchoice) {
- $params=~s/(^|\s+)(\d+)\s+"?\Q$oldchoice\E"?(\s+|$)/$1.($2-1)." \"$oldchoice\"".$3/se;
+ $params=~s/(^|\s+)(\d+)\s+"?\Q$oldchoice\E"?(\s+|$)/$1.($2-1 >=0 ? $2-1 : 0))." \"$oldchoice\"".$3/se;
}
}
return "[[poll $params]]";