From 02c5c8567add83f54d01400fa03b582bef354b46 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 23 Sep 2018 18:41:47 +0200 Subject: [PATCH] Fix rare crash if deleting spamfilter by id that isn't a spamfilter. --- src/modules/m_tkl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_tkl.c b/src/modules/m_tkl.c index 8954bbe55..52a0022b2 100644 --- a/src/modules/m_tkl.c +++ b/src/modules/m_tkl.c @@ -675,7 +675,7 @@ int spamfilter_del_by_id(aClient *sptr, char *id) { for (tk = tklines[index]; tk; tk = tk->next) { - if ((tk->type & (TKL_GLOBAL|TKL_SPAMF)) && !strcmp(spamfilter_id(tk), id)) + if (((tk->type & (TKL_GLOBAL|TKL_SPAMF)) == (TKL_GLOBAL|TKL_SPAMF)) && !strcmp(spamfilter_id(tk), id)) { found = 1; break;