Don't crash when reading spamfilters from tkldb that don't compile (anymore).

For example, because of a different version of PCRE2, or because of the switch
from non-UTF8 to UTF8 (or vice versa) which disallows certain byte sequences.
This commit is contained in:
Bram Matthys 2023-10-05 17:37:06 +02:00
parent 1d34753f18
commit 8398c8cd8d
No known key found for this signature in database
GPG key ID: BF8116B163EAAE98

View file

@ -713,7 +713,8 @@ int read_tkldb(void)
R_SAFE(unrealdb_read_int64(db, &v));
tkl->ptr.spamfilter->tkl_duration = v;
if (find_tkl_spamfilter(tkl->type, tkl->ptr.spamfilter->match->str,
if (!do_not_add &&
find_tkl_spamfilter(tkl->type, tkl->ptr.spamfilter->match->str,
tkl->ptr.spamfilter->action->action,
tkl->ptr.spamfilter->target))
{