From 58a90e4a5d10fa10b5e232b5b2a3acda10e233c1 Mon Sep 17 00:00:00 2001 From: djcb Date: Wed, 5 Sep 2012 01:24:18 +0300 Subject: [PATCH] * lib/mu-contacts: make address comparison case-insensitive --- lib/mu-contacts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mu-contacts.c b/lib/mu-contacts.c index 2de46016..9539820f 100644 --- a/lib/mu-contacts.c +++ b/lib/mu-contacts.c @@ -72,8 +72,10 @@ encode_email_address (const char *addr) /* make sure chars are with {' ' .. '~'}, and not '[' ']' */ for (cur = strncpy(enc, addr, sizeof(enc)); *cur != '\0'; ++cur) - if (!isalnum(*cur)) + if (!isalnum(*cur)) { *cur = 'A' + (*cur % ('Z' - 'A')); + } else + *cur = tolower(*cur); return enc; }