summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Users.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNDB/Handler/Users.pm')
-rw-r--r--lib/VNDB/Handler/Users.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm
index cc5ce28c..cc42f4d0 100644
--- a/lib/VNDB/Handler/Users.pm
+++ b/lib/VNDB/Handler/Users.pm
@@ -76,10 +76,10 @@ sub userpage {
} elsif($votes) {
my($total, $count) = (0, 0);
for (1..@$votes) {
- $total += $_*$votes->[$_-1];
- $count += $votes->[$_-1];
+ $count += $votes->[$_-1][0];
+ $total += $votes->[$_-1][1];
}
- lit mt '_userpage_votes_item', "/u$uid/votes", $count, sprintf '%.2f', $total/$count;
+ lit mt '_userpage_votes_item', "/u$uid/votes", $count, sprintf '%.2f', $total/$count/10;
} else {
txt '-';
}