mirror of
https://github.com/rspamd/rspamd.git
synced 2024-08-29 17:54:54 +02:00
Another fix for comparing parts without content - two empty parts are equal.
This commit is contained in:
parent
eb37f21a76
commit
d56c45424b
@ -461,7 +461,12 @@ fuzzy_compare_hashes (fuzzy_hash_t * h1, fuzzy_hash_t * h2)
|
||||
l2 = strlen (h2->hash_pipe);
|
||||
|
||||
if (l1 == 0 || l2 == 0) {
|
||||
return 0;
|
||||
if (l1 == 0 && l2 == 0) {
|
||||
return 100;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
res = lev_distance (h1->hash_pipe, l1, h2->hash_pipe, l2);
|
||||
|
Loading…
Reference in New Issue
Block a user