diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-16 16:39:53 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-16 16:39:53 +0100 |
commit | 074a49e743ced410e859c6cd4317071f3504888a (patch) | |
tree | d8fc4e670683535c8b3612aaefe2454cbe70ed87 /src/libmime | |
parent | 80bce97605e1b514acbb36f365dd40b7105007ed (diff) | |
download | rspamd-074a49e743ced410e859c6cd4317071f3504888a.tar.gz rspamd-074a49e743ced410e859c6cd4317071f3504888a.zip |
Fix stupid misprint in array indexing.
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c index ea437172f..fe435253a 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -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)); |