Jacek Caban : mshtml: Use case insensitive comparition in parse_ua_compatible.

Alexandre Julliard julliard at winehq.org
Wed May 30 15:30:51 CDT 2018


Module: wine
Branch: master
Commit: c36bbc352e53a4779f1eab79491f0d8ab4032b38
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c36bbc352e53a4779f1eab79491f0d8ab4032b38

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed May 30 19:49:41 2018 +0200

mshtml: Use case insensitive comparition in parse_ua_compatible.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/mutation.c     | 3 ++-
 dlls/mshtml/tests/script.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c
index 1144b47..39a0e58 100644
--- a/dlls/mshtml/mutation.c
+++ b/dlls/mshtml/mutation.c
@@ -393,11 +393,12 @@ static BOOL parse_ua_compatible(const WCHAR *p, compat_mode_t *r)
 {
     int v = 0;
 
+    static const WCHAR ie_eqW[] = {'I','E','='};
     static const WCHAR edgeW[] = {'e','d','g','e',0};
 
     TRACE("%s\n", debugstr_w(p));
 
-    if(p[0] != 'I' || p[1] != 'E' || p[2] != '=')
+    if(strncmpiW(ie_eqW, p, sizeof(ie_eqW)/sizeof(WCHAR)))
         return FALSE;
     p += 3;
 
diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c
index db6ac25..3decb86 100644
--- a/dlls/mshtml/tests/script.c
+++ b/dlls/mshtml/tests/script.c
@@ -3425,7 +3425,7 @@ static void run_script_as_http_with_mode(const char *script, const char *opt, co
             "  </body>\n"
             "</html>\n",
             document_mode ? "<!DOCTYPE html>\n" : "",
-            document_mode ? "<meta http-equiv=\"x-ua-compatible\" content=\"IE=" : "",
+            document_mode ? "<meta http-equiv=\"x-ua-compatible\" content=\"Ie=" : "",
             document_mode ? document_mode : "",
             document_mode ? "\">" : "",
             script);




More information about the wine-cvs mailing list