From c22dc4fcabb317066ed91874545199e6191a7d45 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 29 Jan 2021 04:07:00 +0100 Subject: [PATCH] Ignore empty lines in spam filter. --- src/cgi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cgi.cpp b/src/cgi.cpp index 921c1e9..b9e178a 100644 --- a/src/cgi.cpp +++ b/src/cgi.cpp @@ -232,7 +232,7 @@ bool is_spam(const entry_type &entry) string line; while (getline(file, line)) { - if (regex_search(entry.description, regex{line})) + if (!line.empty() && regex_search(entry.description, regex{line})) { return true; }