]> source.dussan.org Git - rspamd.git/commitdiff
Fix for fuzzy matching.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 22 Dec 2014 22:23:51 +0000 (22:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 22 Dec 2014 22:23:51 +0000 (22:23 +0000)
src/libserver/fuzzy_backend.c

index 03d40161b6ba186a6f36d0f261b5a3cecbf6d05e..c513ad06f8f99e1d784ca9159a1db86a9a548544 100644 (file)
@@ -610,12 +610,12 @@ rspamd_fuzzy_backend_check (struct rspamd_fuzzy_backend *backend,
                                cur_cnt ++;
                        }
                        else {
+                               cur_id = shingle_values[i];
                                if (cur_cnt >= max_cnt) {
                                        max_cnt = cur_cnt;
                                        sel_id = cur_id;
                                }
                                cur_cnt = 0;
-                               cur_id = shingle_values[i];
                        }
                }