+2003-11-04 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-score.el (gnus-decay-score): Protect against arithmetic
+ errors. Tiny patch from Norbert Koch <viteno@xemacs.org>.
+
2003-10-31 Teodor Zlatanov <tzz@lifelogs.com>
* spam.el
(defun gnus-decay-score (score)
"Decay SCORE according to `gnus-score-decay-constant' and `gnus-score-decay-scale'."
- (floor
- (- score
- (* (if (< score 0) -1 1)
- (min (abs score)
- (max gnus-score-decay-constant
- (* (abs score)
- gnus-score-decay-scale)))))))
+ (condition-case nil
+ (floor
+ (- score
+ (* (if (< score 0) -1 1)
+ (min (abs score)
+ (max gnus-score-decay-constant
+ (* (abs score)
+ gnus-score-decay-scale))))))
+ (arith-error (lsh -1 -1))))
(defun gnus-decay-scores (alist day)
"Decay non-permanent scores in ALIST."