Bug 1571724 - Fix logic error in string comparison in nsMapiHook::PopulateCompFieldsW(). r=mkmelin a=jorgk
authorJorg K <jorgk@jorgk.com>
Tue, 06 Aug 2019 23:47:44 +0200
changeset 36146 dadc53787af48f91dfecd8f82973acc7e4908395
parent 36145 873ab6184a67a0e538d95fc2ed90d9d98716233d
child 36147 16a23290aead7ae74a967f509e1fc14bdf558b6a
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersmkmelin, jorgk
bugs1571724
Bug 1571724 - Fix logic error in string comparison in nsMapiHook::PopulateCompFieldsW(). r=mkmelin a=jorgk
mailnews/mapi/mapihook/src/msgMapiHook.cpp
--- a/mailnews/mapi/mapihook/src/msgMapiHook.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiHook.cpp
@@ -705,17 +705,17 @@ nsresult nsMapiHook::PopulateCompFieldsW
 
   if (aMessage->lpRecips) {
     for (int i = 0; i < (int)aMessage->nRecipCount; i++) {
       if (aMessage->lpRecips[i].lpszAddress || aMessage->lpRecips[i].lpszName) {
         const wchar_t *addressWithoutType =
             (aMessage->lpRecips[i].lpszAddress)
                 ? aMessage->lpRecips[i].lpszAddress
                 : aMessage->lpRecips[i].lpszName;
-        if (nsDependentString(addressWithoutType, 5).EqualsASCII("SMTP:") == 0)
+        if (_wcsnicmp(addressWithoutType, L"SMTP:", 5) == 0)
           addressWithoutType += 5;
         switch (aMessage->lpRecips[i].ulRecipClass) {
           case MAPI_TO:
             if (!To.IsEmpty()) To += Comma;
             To.Append(nsDependentString(addressWithoutType));
             break;
 
           case MAPI_CC: