]> git.donarmstrong.com Git - debbugs.git/commitdiff
scores can be negative
authorDon Armstrong <don@donarmstrong.com>
Wed, 21 Feb 2018 21:25:15 +0000 (13:25 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 21 Feb 2018 21:25:15 +0000 (13:25 -0800)
bin/debbugs-spam

index a24c02a3e8f20f4ad28efc0c554aa9f8ea68b0e3..da5e4577852855152d0f046fc8db757cd3ab2f74 100755 (executable)
@@ -373,7 +373,7 @@ sub spam_score {
         while (<$spamc_out>) {
             if (/^X-Spam/) {
                 $report .= $_;
-                if (/^X-Spam-Status: (Yes|No), score=([\d\.]+) required=([\d\.]+)/) {
+                if (/^X-Spam-Status: (Yes|No), score=(-?[\d\.]+) required=(-?[\d\.]+)/) {
                     $threshold = $3;
                     $score = $2;
                 }