]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Initialise candidates even in shortage of words case
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 9 Sep 2018 17:11:22 +0000 (18:11 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 9 Sep 2018 17:11:22 +0000 (18:11 +0100)
src/libmime/lang_detection.c

index dfd62d4e5f4295594c8851710a5c6dc238e14fbe..d4237690d24f128ee7ae3342c9009301daa25e8b 100644 (file)
@@ -1604,6 +1604,7 @@ rspamd_language_detector_detect (struct rspamd_task *task,
                                        (int)part->utf_words->len,
                                        (int)default_short_text_limit);
                        rspamd_language_detector_set_language (task, part, "en");
+                       candidates = kh_init (rspamd_candidates_hash);
                }
                else {
                        candidates = kh_init (rspamd_candidates_hash);