diff options
-rw-r--r-- | src/libutil/trie.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/trie.c b/src/libutil/trie.c index 8c9e0f600..b3bdeaf4a 100644 --- a/src/libutil/trie.c +++ b/src/libutil/trie.c @@ -150,6 +150,10 @@ rspamd_trie_insert (rspamd_trie_t *trie, const gchar *pattern, gint pattern_id) q1->fail = n->state; if (q1->fail->final > q1->final) { q1->final = q1->fail->final; + + if (q1->id == -1) { + q1->id = q1->fail->id; + } } } else { |