← Back to team overview

vm team mailing list archive

[Bug 394456] Re: Problem in vm-su-spam-score-aux

 

** Branch linked: lp:vm

-- 
You received this bug notification because you are a member of VM
development team, which is the registrant for VM (defunct).
https://bugs.launchpad.net/bugs/394456

Title:
  Problem in vm-su-spam-score-aux

Status in VM - Goto http://launchpad.net/vm for active development:
  Fix Released
Status in VM (View Mail) for Emacs:
  In Progress

Bug description:
  vm-su-spam-score-aux errs if the message has no spam-status field.
  This patch makes it return 0 in that case.

  --- /homes/gws/mernst/emacs/vm-8.0.12/lisp/vm-summary.el	2008-11-05 12:04:35.000000000 -0800
  +++ -	2009-07-01 12:49:03.385630020 -0700
  @@ -737,7 +737,8 @@
   (defun vm-su-spam-score-aux (m)
     "Return the numeric spam level for M."
     (let ((spam-status (vm-get-header-contents m "X-Spam-Status:")))
  -    (if (string-match "\\(hits\\|score\\)=\\([+-]?[0-9.]+\\)" spam-status)
  +    (if (and spam-status
  +	     (string-match "\\(hits\\|score\\)=\\([+-]?[0-9.]+\\)" spam-status))
           (string-to-number (match-string 2 spam-status))
         0)))