diff options
author | Yorhel <git@yorhel.nl> | 2020-07-09 14:04:32 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-07-09 14:04:34 +0200 |
commit | e32b11875bcc86891ea5a70fbd4f30ec17102db1 (patch) | |
tree | ee225eb1b81c8695c19daf557fa0ac1c1857a083 /lib | |
parent | a789d3e6f1dd8e2534afe7d1978271446e15230d (diff) |
VN::Page: Initialze screenshot rating counts
Ensures that we properly display a (0) even there are no safe
screenshots.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNWeb/VN/Page.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNWeb/VN/Page.pm b/lib/VNWeb/VN/Page.pm index cec5d6eb..e7524e82 100644 --- a/lib/VNWeb/VN/Page.pm +++ b/lib/VNWeb/VN/Page.pm @@ -618,7 +618,8 @@ sub screenshots_ { my $viop = auth->pref('max_violence')||0; $viop = 0 if $sexp < 0; - my(@sex, @vio); + my @sex = (0,0,0); + my @vio = (0,0,0); for (@$s) { $sex[$_->{scr}{sexual}]++; $vio[$_->{scr}{violence}]++ } my %rel; |