From 5dd792f1e1f6560a1f7f166bf8471ef5321e42c6 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 18 Feb 2004 06:42:12 +0000 Subject: [ fixes bug #53620 ] 2004-02-17 Chris Toshok [ fixes bug #53620 ] * gui/merging/eab-contact-compare.c (eab_contact_compare_name): "" is a valid (and common) value for elements of EContactName now. it's semantically equivalent to NULL in the old ECard foo. svn path=/trunk/; revision=24769 --- addressbook/gui/merging/eab-contact-compare.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addressbook/gui/merging') diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index ec80f12639..33a696261e 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -300,7 +300,7 @@ eab_contact_compare_name (EContact *contact1, EContact *contact2) if (a == NULL || b == NULL) return EAB_CONTACT_MATCH_NOT_APPLICABLE; - if (a->given && b->given) { + if (a->given && b->given && *a->given && *b->given) { ++possible; if (name_fragment_match_with_synonyms (a->given, b->given, FALSE /* both inputs are complete */)) { ++matches; @@ -308,7 +308,7 @@ eab_contact_compare_name (EContact *contact1, EContact *contact2) } } - if (a->additional && b->additional) { + if (a->additional && b->additional && *a->additional && *b->additional) { ++possible; if (name_fragment_match_with_synonyms (a->additional, b->additional, FALSE /* both inputs are complete */)) { ++matches; @@ -316,7 +316,7 @@ eab_contact_compare_name (EContact *contact1, EContact *contact2) } } - if (a->family && b->family) { + if (a->family && b->family && *a->family && *b->family) { ++possible; /* We don't allow "loose matching" (i.e. John vs. Jon) on family names */ if (! e_utf8_casefold_collate (a->family, b->family)) { -- cgit v1.2.3