diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-06 14:42:48 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-06 14:42:48 +0100 |
commit | d89232620109508913664acbafe780a112a84fd1 (patch) | |
tree | 262edc6d3de754c801f107945d22ef352c023f4f /src/libutil | |
parent | c45362211a8573b7a6c57c83f56ff00ff6f6d358 (diff) | |
download | rspamd-d89232620109508913664acbafe780a112a84fd1.tar.gz rspamd-d89232620109508913664acbafe780a112a84fd1.zip |
Fix bug when building fail states.
Diffstat (limited to 'src/libutil')
-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 { |