]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix stupid misprint in array indexing.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 16 Jul 2015 15:39:53 +0000 (16:39 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 16 Jul 2015 15:39:53 +0000 (16:39 +0100)
src/libmime/message.c

index ea437172f77723cbf7c84d6e68ee914fc7b2cede..fe435253a71123aa6a109f4fb83dc085786971b8 100644 (file)
@@ -1031,7 +1031,7 @@ rspamd_words_levenshtein_distance (GArray *w1, GArray *w2)
                for (y = 1, lastdiag = x - 1; y <= s1len; y++) {
                        olddiag = column[y];
                        s1 = &g_array_index (w1, rspamd_fstring_t, y - 1);
-                       s2 = &g_array_index (w1, rspamd_fstring_t, x - 1);
+                       s2 = &g_array_index (w2, rspamd_fstring_t, x - 1);
                        eq = rspamd_fstring_equal (s1, s2) ? 0 : 1;
                        column[y] = MIN3 (column[y] + 1, column[y - 1] + 1,
                                        lastdiag + (eq));