aboutsummaryrefslogtreecommitdiffstats
path: root/src/diff.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-12-03 16:30:09 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-12-03 16:30:09 +0400
commite981e52b3a4e74fc365150a9e8cac43bc10c2969 (patch)
tree43de51f9e0a621fa016d03ab4a5c8ac81f90a7e5 /src/diff.c
parent71defe8523b86a0c0ac898f5512f70ab74df15c7 (diff)
downloadrspamd-e981e52b3a4e74fc365150a9e8cac43bc10c2969.tar.gz
rspamd-e981e52b3a4e74fc365150a9e8cac43bc10c2969.zip
Fix diff normalization.
Fix redirector call in surbl module.
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/diff.c b/src/diff.c
index 3173b5f19..354cfeda9 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -411,7 +411,7 @@ compare_diff_distance_normalized (f_str_t *s1, f_str_t *s2)
t = b1;
/* The first string */
- while (r1 > 0 && h - b1 < (gint)sizeof (b1)) {
+ while (r1 > 0 && t - b1 < (gint)sizeof (b1)) {
if (!g_ascii_isspace (*h)) {
*t++ = g_ascii_tolower (*h);
}
@@ -421,12 +421,12 @@ compare_diff_distance_normalized (f_str_t *s1, f_str_t *s2)
}
t1.begin = b1;
- t1.len = h - b1;
+ t1.len = t - b1;
/* The second string */
h = p2;
t = b2;
- while (r2 > 0 && h - b2 < (gint)sizeof (b2)) {
+ while (r2 > 0 && t - b2 < (gint)sizeof (b2)) {
if (!g_ascii_isspace (*h)) {
*t++ = g_ascii_tolower (*h);
}
@@ -436,7 +436,7 @@ compare_diff_distance_normalized (f_str_t *s1, f_str_t *s2)
}
t2.begin = b2;
- t2.len = h - b2;
+ t2.len = t - b2;
cur_diff += compare_diff_distance_unnormalized (&t1, &t2);
}