From a982d8ba8aa73bb316ebeb6f2eeabb304358b9fa Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sun, 12 Jun 2022 15:19:52 -0400 Subject: Differentiate between 0 and undefined. --- bin/spamcat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/spamcat b/bin/spamcat index 60fdf46..dfc0876 100755 --- a/bin/spamcat +++ b/bin/spamcat @@ -96,7 +96,8 @@ if ($#ARGV >= 0) { } elsif ($cmd eq 'get') { my $sender = shift @ARGV; pod2usage(1) unless $sender; - my $count = $sch->get_count($sender) || $conf{default_count}; + my $count = $sch->get_count($sender); + $count = $conf{default_count} if (!defined $count); print "$sender has $count messages remaining.\n"; } elsif ($cmd eq 'set') { my ($sender, $count) = @ARGV; -- cgit v1.2.3