Sylvain Petreolle : mshtml: Allow either REG_SZ or REG_EXPAND_SZ for GeckoCabDir.

Alexandre Julliard julliard at winehq.org
Mon Jun 7 10:02:29 CDT 2010


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

Author: Sylvain Petreolle <spetreolle at yahoo.fr>
Date:   Wed Jun  2 09:44:41 2010 -0700

mshtml: Allow either REG_SZ or REG_EXPAND_SZ for GeckoCabDir.

---

 dlls/mshtml/install.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c
index 4122194..65faa5a 100644
--- a/dlls/mshtml/install.c
+++ b/dlls/mshtml/install.c
@@ -235,13 +235,13 @@ static BOOL install_from_registered_dir(void)
         return FALSE;
 
     file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME));
-    res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
+    res = RegGetValueA(hkey, NULL, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)file_name, &size);
     if(res == ERROR_MORE_DATA) {
         file_name = heap_realloc(file_name, size+sizeof(GECKO_FILE_NAME));
-        res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
+        res = RegGetValueA(hkey, NULL, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)file_name, &size);
     }
     RegCloseKey(hkey);
-    if(res != ERROR_SUCCESS || type != REG_SZ) {
+    if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) {
         heap_free(file_name);
         return FALSE;
     }




More information about the wine-cvs mailing list