From 446ee0cba36614695bee57f87c220a49d2a78ed8 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Sun, 3 Jan 2010 21:41:21 +0100
Subject: [PATCH] Spamtest extension: fixed result when over the maximum score.

---
 .../plugins/spamvirustest/ext-spamvirustest-common.c         | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest-common.c b/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest-common.c
index 937eb6743..a4c295d60 100644
--- a/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest-common.c
+++ b/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest-common.c
@@ -527,6 +527,11 @@ const char *ext_spamvirustest_get_value
 	/* Calculate value */
 	if ( status_value < 0 ) {
 		value = 1;
+	} else if ( status_value > max_value ) {
+		if ( percent )
+			value = 100;
+		else
+			value = 10;
 	} else {
 		if ( percent )
 			value = (status_value / max_value) * 99 + 1;
-- 
GitLab