Bug 1393528 Add parentheses to a confusing if statement r?jimm draft
authorTom Ritter <tom@mozilla.com>
Thu, 24 Aug 2017 12:34:09 -0500
changeset 653101 6cfc691b9726960544482f7fdabe0eca80e28d22
parent 653100 fdf6d376b92a161915201680bc1bf33650374e9e
child 653102 be8bba0e9d5737b96464cc3667568061bb8af264
push id76238
push userbmo:tom@mozilla.com
push dateFri, 25 Aug 2017 15:17:03 +0000
reviewersjimm
bugs1393528
milestone57.0a1
Bug 1393528 Add parentheses to a confusing if statement r?jimm MozReview-Commit-ID: rKnimtw55c
widget/windows/nsClipboard.cpp
--- a/widget/windows/nsClipboard.cpp
+++ b/widget/windows/nsClipboard.cpp
@@ -104,18 +104,18 @@ UINT nsClipboard::GetFormat(const char* 
            strcmp(aMimeStr, kJPGImageMime) == 0 ||
            strcmp(aMimeStr, kPNGImageMime) == 0) {
     format = CF_DIBV5;
   }
   else if (strcmp(aMimeStr, kFileMime) == 0 ||
            strcmp(aMimeStr, kFilePromiseMime) == 0) {
     format = CF_HDROP;
   }
-  else if (strcmp(aMimeStr, kNativeHTMLMime) == 0 ||
-           aMapHTMLMime && strcmp(aMimeStr, kHTMLMime) == 0) {
+  else if ((strcmp(aMimeStr, kNativeHTMLMime) == 0) ||
+           (aMapHTMLMime && strcmp(aMimeStr, kHTMLMime) == 0)) {
     format = CF_HTML;
   }
   else if (strcmp(aMimeStr, kCustomTypesMime) == 0) {
     format = CF_CUSTOMTYPES;
   }
   else {
     format = ::RegisterClipboardFormatW(NS_ConvertASCIItoUTF16(aMimeStr).get());
   }