aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2022-06-12 15:46:56 -0400
committerBrian Cully <bjc@kublai.com>2022-06-12 15:46:56 -0400
commitd5854dd65ddc3ab6638794b2554e7f86a358b89f (patch)
tree5f5e94f68e2c76c868398473a7fefb58b343d56d /bin
parenta982d8ba8aa73bb316ebeb6f2eeabb304358b9fa (diff)
downloadspamcat-d5854dd65ddc3ab6638794b2554e7f86a358b89f.tar.gz
spamcat-d5854dd65ddc3ab6638794b2554e7f86a358b89f.zip
Add more tests, and fix setting count to 0.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spamcat2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/spamcat b/bin/spamcat
index dfc0876..9af410d 100755
--- a/bin/spamcat
+++ b/bin/spamcat
@@ -101,7 +101,7 @@ if ($#ARGV >= 0) {
print "$sender has $count messages remaining.\n";
} elsif ($cmd eq 'set') {
my ($sender, $count) = @ARGV;
- pod2usage(1) unless $count && $count =~ /\d+/;
+ pod2usage(1) unless defined($count) && $count =~ /\d+/;
$sch->set_count($sender, $count);
print "$sender has $count messages remaining.\n";
} else {