summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-10-30 17:18:47 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-10-30 17:18:47 +0100
commit0ffd106e689f7accd78c6f401f7a56d83bd75a97 (patch)
treec15986a7180b702dc01c739394e5eba173cebb2d /lib
parent4dbbedaf6bd953e5d57023eefc3acf742e91f511 (diff)
utilization_icon: handle unknown first/second class utilization
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm
index 83cb77a..836f94e 100644
--- a/lib/DBInfoscreen.pm
+++ b/lib/DBInfoscreen.pm
@@ -240,7 +240,9 @@ sub startup {
$self->helper(
'utilization_icon' => sub {
my ( $self, $utilization ) = @_;
- my ( $first, $second ) = @{ $utilization // [ 0, 0 ] };
+ my ( $first, $second ) = @{ $utilization // [] };
+ $first //= 0;
+ $second //= 0;
my $sum = ( $first + $second ) / 2;
my @symbols