From 1e4c5b58ad2352a21fdcc33e85582f1b40b31fd2 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 2 Oct 2015 14:27:14 +0200 Subject: [PATCH] ContactsTableViewController: fix contacts list when having 2 contacts with the same name --- Classes/ContactsTableViewController.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/ContactsTableViewController.m b/Classes/ContactsTableViewController.m index ae8cd8882..25a25e908 100644 --- a/Classes/ContactsTableViewController.m +++ b/Classes/ContactsTableViewController.m @@ -194,6 +194,9 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) { forKey:firstChar selector:@selector(caseInsensitiveCompare:)]; } + while ([subDic objectForKey:name2ASCII] != nil) { + name2ASCII = [name2ASCII stringByAppendingString:@"_"]; + } [subDic insertObject:lPerson forKey:name2ASCII selector:@selector(caseInsensitiveCompare:)]; } }