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 35283 dadc53787af48f91dfecd8f82973acc7e4908395
parent 35282 873ab6184a67a0e538d95fc2ed90d9d98716233d
child 35284 16a23290aead7ae74a967f509e1fc14bdf558b6a
push id2477
push usermozilla@jorgk.com
push dateTue, 13 Aug 2019 21:14:23 +0000
treeherdercomm-beta@436d8b620b6a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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: