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; }