[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    mshtml: Add trailing '\' to gecko_path if needed.
From:       Jacek Caban <jacek () codeweavers ! com>
Date:       2006-06-30 21:38:43
Message-ID: 44A599E3.1070102 () codeweavers ! com
[Download RAW message or body]

["1ec680524caa742ee77f0c65ead1a79319e80d04.diff" (text/x-patch)]

diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c
index cd2a124..9abffa7 100644
--- a/dlls/mshtml/install.c
+++ b/dlls/mshtml/install.c
@@ -94,8 +94,12 @@ static void set_registry(LPCSTR install_
     }
 
     len = MultiByteToWideChar(CP_ACP, 0, install_dir, -1, NULL, 0)-1;
-    gecko_path = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)+sizeof(wszWineGecko));
+    gecko_path = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR)+sizeof(wszWineGecko));
     MultiByteToWideChar(CP_ACP, 0, install_dir, -1, gecko_path, -1);
+
+    if(gecko_path[len] != '\\')
+        gecko_path[len++] = '\\';
+
     memcpy(gecko_path+len, wszWineGecko, sizeof(wszWineGecko));
 
     size = len*sizeof(WCHAR)+sizeof(wszWineGecko);






[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic